
14th November 2006, 13:04
|
|
Junior Member
|
|
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
suPHP. Premature end of s.
I have installed php4 and php5 after this http://howtoforge.com/apache2_with_php5_and_php4 howto, and now i have used the http://howtoforge.com/apache2_suphp_php4_php5 howto, an have checked the logs and all files on the server has the right permissions. But i just get "Premature end of script header: info.php", i have been searching for answers on this all day and yesterday, but nothing about this ?
I have tried to change "x-httpd-php" in suphp.conf to /usr/bin/php4-cgi and /usr/lib/cgi-bin/php4-cgi but same error everytime.
Hope some of you guys have seen this error before and know what it is.
|

15th November 2006, 15:26
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
What's in Apache's error log? What's the output of or ?
|

15th November 2006, 20:19
|
|
Junior Member
|
|
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
apache2 -t gives:
Syntax OK
apache2 -v gives:
Server version: Apache/2.0.54
Server built: Jul 28 2006 09:04:55
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D HTTPD_ROOT=""
-D SUEXEC_BIN="/usr/lib/apache2/suexec2"
-D DEFAULT_PIDLOG="/var/run/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="/var/run/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="/etc/apache2/mime.types"
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"
Error.log:
[Tue Nov 14 12:58:09 2006] [error] [client x.x.x.x] Premature end of script headers: index.php
|

16th November 2006, 16:03
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
Quote:
|
Originally Posted by Wiesemarc
Error.log:
[Tue Nov 14 12:58:09 2006] [error] [client x.x.x.x] Premature end of script headers: index.php
|
What's in that index.php file?
|

16th November 2006, 17:32
|
|
Junior Member
|
|
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
In the file index.php this is:
<?
phpinfo();
?>
|

17th November 2006, 15:05
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
What happens if you change it to
PHP Code:
<?php
phpinfo();
?>
?
|

17th November 2006, 16:07
|
|
Junior Member
|
|
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Then i will get the same error.
Have also tried <? echo "test; ?>, <?php echo "test; ?> <?PHP echo "test; ?> and others, but same error everytime, if i change the dir to 644 i will get the pcfg_openfile error (.htaccess)
Don't really know what to do next.
|

18th November 2006, 14:51
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
Directories must always be executable, so you should chmod it back to 755 (or whatever it was before).
Can you post your Apache vhost configuration here? Which PHP is your CGI version, and which an Apache module?
|

18th November 2006, 15:49
|
|
Junior Member
|
|
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Apache Vhost Info:
<VirtualHost *>
DocumentRoot "/var/www/mydata/test"
ServerName domain
ServerAlias domain
ServerAdmin mail
ErrorLog /var/www/logs/admin/test.ooz.dk-error.log
CustomLog /var/www/logs/admin/test.ooz.dk-access.log combined
suPHP_Engine on
suPHP_UserGroup 10000 10000
AddHandler x-httpd-php .php .php3 .php4 .php5
suPHP_AddHandler x-httpd-php
<Directory /var/www/mydata/test>
Options ExecCGI
</Directory>
</VirtualHost>
Php informations.
# php4 -v
PHP 4.4.4-0.dotdeb.1 (cli) (built: Aug 21 2006 16:07:30)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
# php5 -v
PHP 5.1.6-0.dotdeb.2 (cli) (built: Aug 31 2006 17:18:42)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
|

19th November 2006, 17:24
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,594 Times in 2,445 Posts
|
|
What's in /etc/suphp.conf?
In which directory is index.php located?
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 00:26.
|
Recent comments
1 day 33 min ago
1 day 38 min ago
1 day 5 hours ago
1 day 12 hours ago
1 day 13 hours ago
1 day 14 hours ago
1 day 18 hours ago
2 days 1 hour ago
2 days 5 hours ago
2 days 6 hours ago