Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th November 2006, 13:04
Wiesemarc Wiesemarc is offline
Junior Member
 
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.
Reply With Quote
Sponsored Links
  #2  
Old 15th November 2006, 15:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

What's in Apache's error log? What's the output of
Code:
apache2 -t
or
Code:
httpd2 -t
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 15th November 2006, 20:19
Wiesemarc Wiesemarc is offline
Junior Member
 
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #4  
Old 16th November 2006, 16:03
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

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?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 16th November 2006, 17:32
Wiesemarc Wiesemarc is offline
Junior Member
 
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In the file index.php this is:

<?
phpinfo();
?>
Reply With Quote
  #6  
Old 17th November 2006, 15:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

What happens if you change it to
PHP Code:
<?php
phpinfo
();
?>
?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 17th November 2006, 16:07
Wiesemarc Wiesemarc is offline
Junior Member
 
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Reply With Quote
  #8  
Old 18th November 2006, 14:51
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
Default

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?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 18th November 2006, 15:49
Wiesemarc Wiesemarc is offline
Junior Member
 
Join Date: Sep 2006
Location: Copenhagen, Denmark
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Reply With Quote
  #10  
Old 19th November 2006, 17:24
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,739 Times in 2,574 Posts
 
Default

What's in /etc/suphp.conf?
In which directory is index.php located?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
suPHP -couldn't create child process error tipsy HOWTO-Related Questions 10 26th November 2007 00:56
Premature end of input - smtpd error herbie Server Operation 11 7th November 2006 04:10
suPHP and mod_vhost_alias Wiesemarc HOWTO-Related Questions 0 6th November 2006 16:45
OpenSuSE 10 suphp and apache2? doom4 Installation/Configuration 1 19th September 2006 15:19
Premature end of script headers ? What is it ? misterm Installation/Configuration 3 10th November 2005 12:23


All times are GMT +2. The time now is 20:32.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.