|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-05-15 16:11 UTC] cahagn_o at epita dot fr
PHP4 snapshot runs fine in command line but Apache fails loading any php file : Premature End of Script Headers resulting in an Internal Server Error.
I checked the Apache FAQ many times and also PHP's.
PHP3 runs fine with the same setup, I use NetBSD 1.3.3 on x86 with gcc 2.7.2.2 with much memory (256MB) on Apache 1.3.12.
PHP4 has always been running fine when compiled as a module since Beta 1 and Apache on the same platform but never made it when compiled as CGI. I thought I should warn this because we're approaching the final release.
The same basic PHP file would load from module, not from cgi (it also loads with PHP3 cgi)
PHP4 doesn't crash but I really don't know how to debug Apache+PHP4_cgi.
Here's my ./configure (compiling without gd, zlib, etc. support didn't help)
./configure --with-config-file-path=/opt/www/etc/httpd/conf/php_cgi \
--enable-discard-path \
--with-gd=/home/guest/www/mbin/i386-NetBSD \
--with-mysql \
--with-dbase \
--with-zlib=/home/guest/www/mbin/i386-NetBSD \
--enable-ftp
I run Apache with suEXEC and PHP3 has been running flawlessly for more than 6 months now.
I tried deleteing some headers from PHP4 source code, many things, I really think it comes from PHP4 because CGI scripts written in sh, Python, Perl, C, PHP3 have always been running fine.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 07:00:01 2025 UTC |
I tried the latest snapshot found on snaps.php.net : php4-200006180145 and is still won't work properly. Here's my ./configure, it still works fine with PHP3 and the same configure (except mysql but I guess it doesn't interfere). ./configure --with-config-file-path=/usr/www/etc/httpd/conf/php_cgi \ --enable-discard-path \ --with-gd=/usr/www/mbin/i386-NetBSD \ --with-mysql \ --with-dbase \ --with-zlib=/usr/www/mbin/i386-NetBSD \ --enable-ftp \ --with-imap=/usr/www/mbin/i386-NetBSD/lib (adding --force-cgi-redirect didn't help) Do I need to set doc_root and user in php.ini ? I use the default one and using these settings didn't change anything. I still get a premature end of script though. Some time ago, with previous PHP4 releases, I obtained "No input file". I am still using Apache 1.3.12 on NetBSD, with suEXEC and this setting in httpd.conf AddHandler cgi-script .cgi .php I'm going to try this setup on a Linux box later to see if the problem also happens.I just tried php4-200006181045 from snaps.php.net on Linux with default Apache 1.3.12 from RedHat 6.2 (no suEXEC) and modified httpd.conf to handle cgi scripts: AddHandler cgi-script .cgi It doesn't seem to work neither (Premature end of script) with the default php.ini mak#!/usr/local/bin/php <?phpinfo()?> Here's the configure line : ./configure --with-config-file-path=/usr/local/etc \ --with-dbase \ --enable-discard-path \ --enable-ftp