Premature end of script headers - Page 3 Premature end of script headers - Page 3
 

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]

Main Menu

Premature end of script headers

Started by mylogon, December 19, 2012, 06:54:18 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

mylogon

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 global $template_footer.

mylogon

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

Αndré

Quote from: mylogon on January 05, 2013, 07:40:58 AM
Through some process of elimination $template_footer = substr($template, $gallery_pos);^M in include/functions.inc.php is what is the kiss of death.

Please add
    var_dump($template_footer);
    die();

below that line and post the HTML output. Don't forget to undo that change.

mylogon

First one:

string(210) "
{CUSTOM_FOOTER}
{CREDITS}
"


Second
string(773) "{CREDITS}

DESIGN BY: zz.COM
COPYRIGHT 2002-2009 - zzz - PRIVACY STATEMENT - TERMS OF USE
"

Αndré


mylogon

I tried it in two different galleries

Αndré

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

and replace with
function template_eval($template, $vars)
{
    return str_replace(array_keys($vars), array_values($vars), $template);
}

mylogon

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

mylogon

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.

Αndré

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)?