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 17372 times)

0 Members and 1 Guest are viewing this topic.

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Premature end of script headers
« on: December 19, 2012, 06:54:18 am »

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.



Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Premature end of script headers
« Reply #1 on: December 19, 2012, 11:28:48 am »

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.
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers: index.php,
« Reply #2 on: December 19, 2012, 12:09:02 pm »

[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.
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Re: Premature end of script headers: index.php,
« Reply #3 on: December 19, 2012, 12:16:05 pm »

Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Re: Premature end of script headers: index.php,
« Reply #4 on: December 19, 2012, 12:18:08 pm »

Ok, that's weird, the link shows bad:

http://surrealsf.com/photos/
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Premature end of script headers
« Reply #5 on: December 19, 2012, 01:24:44 pm »

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

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.
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #6 on: December 19, 2012, 03:19:47 pm »

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:
Code: [Select]
error_reporting(E_ALL);
ini_set('display_errors', '1');
Into the top of login.php and index.php - did not show anything

I tried:
Code: [Select]
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.


Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Premature end of script headers
« Reply #7 on: December 19, 2012, 03:40:14 pm »

I want to find out where/why exactly that issue occur. Please report what happens when you upload a test file which contain
Code: [Select]
<?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
Code: [Select]
<?php
define
('IN_COPPERMINE'true);
define('INDEX_PHP'true);
define('RESTRICTED_PRIV'true);
require(
'include/init.inc.php');
echo 
'works';
Logged

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #8 on: December 19, 2012, 11:32:06 pm »

They both echo'd works.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Premature end of script headers
« Reply #9 on: December 20, 2012, 12:56:34 am »

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

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #10 on: December 20, 2012, 01:55:22 am »

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

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Premature end of script headers
« Reply #11 on: December 20, 2012, 02:09:43 am »

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

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #12 on: December 20, 2012, 12:04:12 pm »

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.
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Premature end of script headers
« Reply #13 on: December 20, 2012, 09:13:31 pm »

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.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #14 on: December 20, 2012, 09:51:34 pm »

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.

Code: [Select]
##/**************************************************
##  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]
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Premature end of script headers
« Reply #15 on: December 20, 2012, 11:47:04 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.
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

mylogon

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 59
Re: Premature end of script headers
« Reply #16 on: December 21, 2012, 01:20:03 am »

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..

Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4822
    • Windsurf.me
Re: Premature end of script headers
« Reply #17 on: December 21, 2012, 10:57:17 am »

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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15760
Re: Re: Premature end of script headers
« Reply #18 on: December 21, 2012, 03:42:24 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
Code: [Select]
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.
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1504
  • aka 'i-imagine'
    • Home Page
Re: Premature end of script headers
« Reply #19 on: December 21, 2012, 07:56:30 pm »

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

Or are you hosting yourself?
Pages: [1] 2 3   Go Up
 

Page created in 0.029 seconds with 20 queries.