Premature end of script headers Premature end of script headers
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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

I am getting that on every install, since Friday/Saturday - I have over 20.  I have checked permissions, put a phpinfo file to check that also, re-downloaded and re-uploaded the software, I have attempted to install a new install, yet for every file I get the same Premature end of script headers.

Since all I see that is not working is Coppermine, I am even more confused as there are multiple other sites and scripts working fine, i.e. Wordpress, so I know the php is not the issue.  I even tried restoring a backup of php.ini from before this happened and rebuilding apache.

Nothing.

Any help would be appreciated - I have reinstalled clean files right from the main download site.  All install are running 1.5.20, so that is not an issue and that is from March anyway, so I have no idea why it "suddenly" stopped.




Αndré

There's currently a similar thread: http://forum.coppermine-gallery.net/index.php/topic,75746.0.html

Please read it and check if anything of that suggestions fixes your issue. If not, please post a link to your gallery.

mylogon

[Thread combined as per Αndré]
I am also getting that on every existing install, since Friday/Saturday - I have over 20.  I have checked permissions, put a phpinfo file to check that also, re-downloaded and re-uploaded the software, I have attempted to install a new install, yet for every file I get the same Premature end of script headers.

Since all I see that is not working is Coppermine, I am even more confused as there are multiple other sites and scripts working fine, i.e. Wordpress, so I know the php is not the issue.  I even tried restoring a backup of php.ini from before this happened and rebuilding apache.

Nothing.

Any help would be appreciated - I have reinstalled clean files right from the main download site.  All install are running 1.5.20, so that is not an issue and that is from March anyway, so I have no idea why it "suddenly" stopped on all installs at the same time.


mylogon


Αndré

Please don't hijack threads, that's not what I asked for. Unfortunately you just posted the same information again.

Quote from: Αndré on December 19, 2012, 11:28:48 AM
check if anything of that suggestions fixes your issue

If not, report what exactly you have tried/checked. It should at least work with the (currently) last suggestion.

mylogon

I misunderstood.

To restate:

I checked all permission - correct.  Host even has a script to check that. (permissions are correct, when i upload a phpinfo file to the same directory it works correctly -as other person has too.)

I placed a phpinfo file in the directory and it worked

I recomplied apache - no change

I restored a version of php.ini from before the apache rebuild - no change

I did a check of all mysql databases -all were ok

I rebooted the computer - no change

I reinstalled a new download direct from the website - no change

I created a new installation - no change

I manually updated ImageMagick - as server is Centos and their version is ancient - no change

I tried putting:
error_reporting(E_ALL);
ini_set('display_errors', '1');

Into the top of login.php and index.php - did not show anything

I tried:
php_flag  log_errors on
php_value error_log  /home/path/public_html/domain/PHP_errors.log

in the .htaccess file (of course with the correct domains and paths

Other sites and scripts that use php are working just fine, i.e. the sample I have http://surrealsf.com/photos, the main site is php.  Wordpress and other installs run fine.

Logs are no where near 2 gigs, as that can cause apache to choke.

Suexex logs show nothing.

Only errors shown are premature, 500 and 404 for the error document, as I removed it to debug.

I am running version 1.5.20, and php and mysql are fine, they have not been updated since the past weekend when they all worked fine.  All that has been updated recently:

tail /var/log/yum.log

Dec 04 13:43:01 Updated: tzdata-2012i-2.el5.i386
Dec 04 13:43:02 Updated: newrelic-daemon-3.1.5.120-1.i386
Dec 04 13:43:06 Updated: newrelic-php5-3.1.5.120-1.i386
Dec 05 23:17:08 Installed: kernel-PAE-2.6.18-308.24.1.el5.i686
Dec 05 23:17:09 Updated: kernel-headers-2.6.18-308.24.1.el5.i386
Dec 05 23:17:19 Installed: kernel-PAE-devel-2.6.18-308.24.1.el5.i686
Dec 05 23:17:25 Installed: kernel-2.6.18-308.24.1.el5.i686
Dec 05 23:17:34 Installed: kernel-devel-2.6.18-308.24.1.el5.i686
Dec 19 02:17:14 Updated: libtiff-3.8.2-18.el5_8.i386
Dec 19 02:17:15 Updated: libtiff-devel-3.8.2-18.el5_8.i386

None of that was this weekend, and I updated libtiff after the fact.



Αndré

I want to find out where/why exactly that issue occur. Please report what happens when you upload a test file which contain
<?php
define
('IN_COPPERMINE'true);
define('INDEX_PHP'true);
define('RESTRICTED_PRIV'true);
echo 
'works';


I assume this will work as expected (no error message), so please report what happens if that file contains
<?php
define
('IN_COPPERMINE'true);
define('INDEX_PHP'true);
define('RESTRICTED_PRIV'true);
require(
'include/init.inc.php');
echo 
'works';

mylogon


Jeff Bailey

Do you use FastCGI? Do you have a .htaccess file in the Coppermine root directory?
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

mylogon

FastCGI is not installed, and I do have the .htaccess.  I do not believe that Fastcgi I have ever had installed. 

Jeff Bailey

Do you have any cgi options or rewrites in the .htaccess?
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

mylogon

Just the ones that Coppermine puts in.  remember, this stopped working on multiple installations at the same time and will not work on a new install.  That's what is so weird.

Jeff Bailey

Coppermine doesn't come with a .htaccess, that's why I was asking. From the similar issues I've seen EngineRewrite and other things could cause the issue. If you can please post the contents of the .htaccess. Depending on how your server is set up it might try running Coppermine as a CGI script.

When you uploaded the code that Αndré suggested where did you put it? the root of your server or in the Coppermine directory? If it wasn't the Coppermine directory please try it there.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

mylogon

I them it in the Coppermine directory.

The .htaccess was put by Coppermine, it's a plugin, but not every installation has one.  So, that is not the problem.

##/**************************************************
##  Coppermine 1.5.x Plugin - sef_urls
##  *************************************************
##  Copyright (c) 2003-2007 Coppermine Dev Team
##  *************************************************
##  This program is free software; you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation; either version 3 of the License, or
##  (at your option) any later version.
##  ********************************************
##  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/branches/cpg1.5.x/plugins/sef_urls/ht-english.txt $
##  $Revision: 7195 $
##  $LastChangedBy: timoswelt $
##  $Date: 2010-02-03 17:58:36 +0100 (Mi, 03 Feb 2010) $
##  **************************************************/

#Options FollowSymLinks SymLinksIfOwnerMatch

RewriteEngine on

#  Uncomment the following line if your webserver's
#  URL is not directly related to physical file paths.
#  Update "YOUR_COPPERMINE_ROOT" (just / for root)

#RewriteBase /YOUR_COPPERMINE_ROOT

#
# Search and contact
#

RewriteRule search.html(.*) search.php$1 [NC]

RewriteRule contact.html(.*) contact.php$1 [NC]


#
# Rewrite usrmgr urls
#

RewriteRule usermgr-page-([0-9]*).html(.*) usermgr.php?page=$1$2 [NC]

RewriteRule usermgr.html(.*) usermgr.php$1 [NC]

#
# Rewrite index urls
#

RewriteRule index.html(.*) index.php$1 [NC]

RewriteRule index-([0-9]*)\.html(.*) index.php?cat=$1$2 [NC]

RewriteRule index-([0-9]*)-page-([0-9]*)\.html(.*) index.php?cat=$1&page=$2$3 [NC]


#
# Rewrite thumbnail urls
#

RewriteRule thumbnails-lastupby-([0-9]+)\.html(.*) thumbnails.php?album=lastupby&uid=$1$2 [NC]

RewriteRule thumbnails-lastcomby-([0-9]+)\.html(.*) thumbnails.php?album=lastcomby&uid=$1$2 [NC]

RewriteRule thumbnails-lastupby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html(.*) thumbnails.php?album=lastupby&cat=$1&uid=$2&page=$3$4 [NC]

RewriteRule thumbnails-lastcomby-([0-9]+)-([0-9]+)-page-([0-9]+)\.html(.*) thumbnails.php?album=lastcomby&cat=$1&uid=$2&page=$3$4 [NC]

RewriteRule thumbnails-([a-z0-9]*)-([\-]?[0-9]*)\.html(.*) thumbnails.php?album=$1&cat=$2$3 [NC]

RewriteRule thumbnails-([a-z0-9]*)-page-([0-9]*)\.html(.*) thumbnails.php?album=$1&page=$2$3 [NC]

RewriteRule thumbnails-([a-z0-9]*)-([\-]?[0-9]*)-page-([0-9]*)\.html(.*) thumbnails.php?album=$1&cat=$2&page=$3$4 [NC]

RewriteRule thumbnails-([0-9a-z]*)\.html(.*) thumbnails.php?album=$1$2 [NC]

RewriteRule thumbnails-search-(.*)\.html(.*) thumbnails.php?album=search&search=$1$2 [NC]


#
# Rewrite displayimage urls
#

RewriteRule displayimage-lastcom-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-page-([\-]?[0-9]+).html(.*) displayimage.php?album=lastcom&cat=$1&pid=$2&msg_id=$3&page=$4$5 [NC]

RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html(.*) displayimage.php?album=$1&cat=$2&pid=$3&uid=$4&msg_id=$5&page=$6$7 [NC]

RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html(.*) displayimage.php?album=$1&cat=$2&pid=$3&uid=$4$5 [NC]

RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)-([\-]?[0-9]+)\.html(.*) displayimage.php?album=$1&cat=$2&pid=$3$4 [NC]

RewriteRule displayimage-([a-z0-9]+)-([\-]?[0-9]+)\.html(.*) displayimage.php?album=$1&pid=$2$3 [NC]

RewriteRule displayimage-([0-9]+)\.html(.*) displayimage.php?pid=$1$2 [NC]


#
# Rewrite users profiles
#

RewriteRule profile-op-([a-z0-9_]+)\.html(.*) profile.php?op=$1 [NC]

RewriteRule profile-([0-9]+)\.html(.*) profile.php?uid=$1$2 [NC]

Jeff Bailey

Quote from: mylogon on December 20, 2012, 09:51:34 PM
it's a plugin, but not every installation has one.  So, that is not the problem.
Thanks for clarifying.
Try installing the latest tarball http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/?view=tar other then that I'm out of ideas, maybe Αndré will come up with something else.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

mylogon

Installing the development one is something I have not tried, I will.  Not sure whether to hope that fixes it or not, as then I have to do about 20 more..


phill104

I very much doubt that would fix the problm. Yours is definately something server related as I am sure you have guessed. Finding that is not going to be easy.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Quote from: Jeff Bailey on December 20, 2012, 11:47:04 PM
Try installing the latest tarball http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/?view=tar
Unfortunately that's not necessarily the latest revision, as we moved our SVN repository recently (which doesn't support tarballs so far), but it still contains some fixes since cpg1.5.20. However, I also doubt it will fix the issue.

My only idea is to do the following. Please disable the sef_urls plugin and delete the .htaccess file temporarily. Then, try to add more and more lines from the original index.php file to the current index.php file on your server. Actually, I expected that it will stop to work with the
require('include/init.inc.php');
line.

My next suspect is the pageheader() function, but please add the code line by line / block by block and check when the error message occurs.

Joe Carver

Are all of the 20 sites running off of the same host?

Or are you hosting yourself?