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 2 [3]   Go Down

Author Topic: Premature end of script headers  (Read 19507 times)

0 Members and 1 Guest are viewing this topic.

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #40 on: January 05, 2013, 07:27:06 am »

OK, none of them work when I remove the comments from that code. It errors on $template_footer, so it seems it is not getting that from the earlier
Code: [Select]
global $template_footer.
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #41 on: January 05, 2013, 07:40:58 am »

Through some process of elimination
Code: [Select]
$template_footer = substr($template, $gallery_pos);^M in include/functions.inc.php is what is the kiss of death.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Premature end of script headers
« Reply #42 on: January 08, 2013, 11:09:18 am »

Through some process of elimination
Code: [Select]
$template_footer = substr($template, $gallery_pos);^M in include/functions.inc.php is what is the kiss of death.

Please add
Code: [Select]
    var_dump($template_footer);
    die();
below that line and post the HTML output. Don't forget to undo that change.
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #43 on: January 08, 2013, 12:23:06 pm »

First one:

Code: [Select]
string(210) "
{CUSTOM_FOOTER}
{CREDITS}
"

Second
Code: [Select]
string(773) "{CREDITS}
 
DESIGN BY: zz.COM
COPYRIGHT 2002-2009 - zzz - PRIVACY STATEMENT - TERMS OF USE
"
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Premature end of script headers
« Reply #44 on: January 08, 2013, 12:25:29 pm »

Why are there 2 different outputs?
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #45 on: January 08, 2013, 12:26:43 pm »

I tried it in two different galleries
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Premature end of script headers
« Reply #46 on: January 08, 2013, 12:30:46 pm »

Totally different approach, but I just recognized it and maybe it fixes your issues. Open include/functions.inc.php, find
Code: [Select]
function template_eval(&$template, &$vars)
{
    return str_replace(array_keys($vars), array_values($vars), $template);
}
and replace with
Code: [Select]
function template_eval($template, $vars)
{
    return str_replace(array_keys($vars), array_values($vars), $template);
}
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #47 on: January 08, 2013, 12:42:13 pm »

Weird, works for one of the galleries, not the other
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #48 on: January 08, 2013, 12:44:59 pm »

I am not really picky about the footer, but really want to figure out what/where it is, so when things are updated I do not have to modify all the installations again. Right now, I have just commented out the line and copied the file (and chowned) to most of the installs.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Premature end of script headers
« Reply #49 on: January 08, 2013, 01:28:25 pm »

Ideally I'd like to check that issue directly on your server. Can you please create a testing gallery and provide a test account (via PM)?
Logged
Pages: 1 2 [3]   Go Up
 

Page created in 0.019 seconds with 20 queries.