Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Problem with "Pic_download_link" plugin in one of custom themes  (Read 5162 times)

0 Members and 1 Guest are viewing this topic.

vikler

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Problem with "Pic_download_link" plugin in one of custom themes
« on: October 06, 2014, 09:19:39 pm »

Hi everyone. I seem to have problem with using "Pic_download_link" plugin in one of my custom themes. I can click the link, and the download starts. But I can't open image, it says I have a corrupted jpg.
Anyway, here is the link to the theme that seems problematic:
http://dane-dehaan.org/photos/displayimage.php?theme=omm_cpg18&album=322&pid=19472#top_display_media
try clicking on "Download HQ photo": you will face the problem described above
And on other themes it works well, the downloaded image can be opened and viewed:
http://dane-dehaan.org/photos/displayimage.php?theme=dane&album=322&pid=19472#top_display_media
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #1 on: October 07, 2014, 12:30:58 am »

There is a LF character (0x0A) prepended to the file when downloaded from the problem theme. I suspect that somewhere the theme code is unnecessarily outputting a linefeed character before the plugin gets a chance to send the file. Suspect areas to look for are extra lines after the closing ?> of a .php file. It's generally best to just delete the ?> at the end of php files.
Logged

vikler

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #2 on: October 07, 2014, 12:42:49 am »

There is a LF character (0x0A) prepended to the file when downloaded from the problem theme. I suspect that somewhere the theme code is unnecessarily outputting a linefeed character before the plugin gets a chance to send the file. Suspect areas to look for are extra lines after the closing ?> of a .php file. It's generally best to just delete the ?> at the end of php files.
thanks for your reply, however I can't find where the located LF character is :( I don't use php's in this theme, it's just template.html. My theme.php is empty.
Any tips on how I find the LF character and get rid of it?:(
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #3 on: October 07, 2014, 01:47:40 am »

your theme.php needs to be at least one line:
Code: [Select]
<?php
Logged

vikler

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: Re: Problem with "Pic_download_link" plugin in one of custom themes
« Reply #4 on: October 07, 2014, 01:49:56 am »

your theme.php needs to be at least one line:
Code: [Select]
<?php
:) that fixed my problem. thanks so much!
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.