Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-02-08 04:08:48

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Problem with Downloaded PDF Files

I have a new problem with a site that has been around for a couple of years but is up to date with Textpattern version: 4.4.1 (r3575). Now, when we upload apparently sound PDF documents to “Files” and then download them from the site, we can’t open them and get this error message There was an error opening this document. The file is damaged and could not be repaired.

I have tried a number of files made up using Adobe Acrobat and other software and the results are the same. Files loaded months ago download and open as intended. The problem seems to exist with this site / Textpattern installation only. The same original documents uploaded to other sites on the same host download and open correctly. I’m stuck !

Offline

#2 2012-02-08 04:13:34

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Problem with Downloaded PDF Files

Can please you post your high diagnostics report (Textpattern / Admin / Diagnostics > Select High)?

Offline

#3 2012-02-08 04:22:05

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: Problem with Downloaded PDF Files

Here we go. The same modified by me textpattern/lib/txplib_misc.php is present on other sites.

Textpattern version: 4.4.1 (r3575)
Last Update: 2011-06-18 17:22:03/2011-06-18 17:12:16
Active plugins: smd_gallery-0.51, cbs_navigation_menu-0.4, zem_contact_reborn-4.0.3.20, zem_contact_lang-4.0.3.6, adi_contact-0.2, rah_metas-1.0.5, aks_header-0.3.3, yab_image-0.3, an7_comments-0.5, rss_admin_db_manager-4.3, rvm_css-0.8.2, ebl-image-edit-2.0, sed_copyright-1.3, rah_sitemap-1.2, rss_article_edit-0.1, glz_custom_fields-1.2.4, smd_lib-0.36, sed_plugin_library-0.3, ebl_write_page_email-0.4, jbx_multiple_image_upload-0.4
Admin-side theme: hive 1.2.3

Other non pertinent detail removed to make for easier reading downstream

Last edited by joebaich (2012-02-08 06:04:04)

Offline

#4 2012-02-08 05:48:52

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Problem with Downloaded PDF Files

You have a plugin that can cause problems, aks_header. Try uninstalling it. Aks_header directly modifies PHP’s output buffer, which means that it also affects and modifies your file downloads. As it modifies files, you will be handed corrupted PDFs.

Offline

#5 2012-02-08 06:01:52

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: Problem with Downloaded PDF Files

That was it. I was wondering about that plug-in but was only using to do a lazy 301 re-direct.

I am very grateful for your help.

Offline

#6 2012-02-08 06:08:05

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Problem with Downloaded PDF Files

If you still want to use the plugin, you could try to update aks_header v0.3.3 to v0.3.6. Seems that some file download issues where fixed after 0.3.3 (in 0.3.3c). Looking at the current code base, while it still globally uses output buffer, it shouldn’t modify anything other than specified page templates.

Offline

#7 2012-02-08 06:17:37

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: Problem with Downloaded PDF Files

Yep, was already considering the need to update the plug-in as a result of you identifying it as a problem and the fact that it hasn’t been an issue for me elsewhere. Probably will stop being lazy and put the re-direct into the .htaccess file. Thanks again Jukka.

Offline

Board footer

Powered by FluxBB