forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: yonatan on December 08, 2012, 06:51:58 pm

Title: Premature end of script headers: index.php,
Post by: yonatan on December 08, 2012, 06:51:58 pm
hello
i cannot use the gallery.
i can see  " internal server error"
checking with the web host the apache logs give me the following output:

 Premature end of script headers: index.php

permissions are correct, when i upload a phpinfo file to the same directory it works correctly.
also on the same server, i have vbulletin phpbb and whmcs installed correctly.
only copermine shows this error.
all documentation refers to permissions ( which are checked )
safe mode is set OFF for this account.

the server is running php 5.2 in fast-cgi
including GD

Code: [Select]
[PHP Modules]
apc
bcmath
calendar
ctype
curl
date
dom
exif
filter
ftp
gd
gettext
hash
iconv
imagick
imap
ionCube Loader
json
libxml
mbstring
mcrypt
mhash
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
posix
Reflection
session
SimpleXML
soap
sockets
SPL
SQLite
standard
tokenizer
xml
xmlreader
xmlwriter
xsl
zip
zlib

[Zend Modules]
the ionCube PHP Loader

apache is latest 2.2 from source
php is compiled from source also.
execution time is set to 60 seconds.


how can this be resolved ?

Title: Re: Premature end of script headers: index.php,
Post by: Αndré on December 10, 2012, 11:17:27 am
permissions are correct, when i upload a phpinfo file to the same directory it works correctly.
Do both files also belong to the same owner and group?


Maybe this helps: http://encodable.com/premature_end_of_script_headers/
Title: Re: Re: Premature end of script headers: index.php,
Post by: yonatan on December 10, 2012, 08:28:08 pm
Do both files also belong to the same owner and group?


Maybe this helps: http://encodable.com/premature_end_of_script_headers/

Hello,
I can confirm zero permission errors.

also ,I have some new tests.
i have copied the content to another server with a slightly different setup, it works.

new server has
php-cgi version 5.3
only GD & no imgick.

might be  a long shot, but i cannot test and remove imgick from 5.2 , due to production environment considerations at this time.


Title: Re: Premature end of script headers: index.php,
Post by: Phill Luckhurst on December 10, 2012, 08:41:18 pm
Are you sure the ownership of the files is correct? If you have root access it is easy to check. Another great  is WinSCP as unlike FileZilla you can see the owner of each file alongside its name and rights. With WinSCP it is very easy to see ownership and perms problems.
Title: Re: Re: Premature end of script headers: index.php,
Post by: yonatan on December 11, 2012, 11:55:50 am
Are you sure the ownership of the files is correct? If you have root access it is easy to check. Another great  is WinSCP as unlike FileZilla you can see the owner of each file alongside its name and rights. With WinSCP it is very easy to see ownership and perms problems.

Yes positive.
I am also using Linux as my work desktop, and I SSH into the server via the terminal.

Title: Re: Premature end of script headers: index.php,
Post by: Αndré on December 11, 2012, 01:28:21 pm
What happens if you visit login.php in your browser? Have you uploaded Coppermine the same way as your phpinfo test file? What happens if you edit index.php, e.g.
Code: [Select]
echo '<?php phpinfo(); ?>' > index.php