[PHP-DEV] PHP 4.0 Bug #4456: PHP4 won't run in cgi mode with Apache From: cahagn_o <email protected>
Date: 05/15/00

From: cahagn_o <email protected>
Operating system: NetBSD 1.3.3
PHP version: 4.0 Release Candidate 2
PHP Bug Type: Scripting Engine problem
Bug description: PHP4 won't run in cgi mode with Apache

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.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>