#19378 [Com]: Parse error in PHP executable as Apache CGI

From: Date: Fri, 25 Oct 2002 00:27:10 +0000
Subject: #19378 [Com]: Parse error in PHP executable as Apache CGI
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-23258@lists.php.net to get a copy of this message
ID: 19378 Comment by: ken@kyler.com Reported By: ken@kyler.com Status: Feedback Bug Type: Apache related Operating System: FreeBSD 4.5-STABLE PHP Version: 4.2.3 New Comment: Recompiled using the same script and now get the following when the page is shown in Apache. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@kyler.com and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. apache_error_log shows: [Thu Oct 24 20:20:45 2002] [error] [client 192.168.1.140] Premature end of script headers: /www/kyler.com/cgi/php nothing else was changed. Ken Previous Comments: ------------------------------------------------------------------------ [2002-10-24 15:35:28] iliaa@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip ------------------------------------------------------------------------ [2002-09-17 01:10:04] janus@area319.de As usual, it seems that nobody is interessted in these problems with PHP as CGI, its the same like this: http://bugs.php.net/bug.php?id=18371 , its a general issue. ------------------------------------------------------------------------ [2002-09-12 13:45:03] ken@kyler.com PHP 4.2.3 compiled on a FreeBSD 4.5-STABLE box with the following options: --with-config-file-path=/usr/local/etc/php.standalone \ --disable-pear \ --enable-discard-path \ --with-readline=/usr \ --enable-versioning \ --with-regex=system \ --with-gd=/usr/local \ --enable-gd-native-ttf \ --with-freetype-dir=/usr/local \ --with-jpeg-dir=/usr/local \ --with-png-dir=/usr/local \ --with-zlib \ --with-mysql=/usr/local \ --enable-trans-sid \ --prefix=/usr/local Apache is configured to use PHP as both a module (which works fine) and a CGI (see below) ## for mapserver & PHP as a CGI ScriptAlias /cgi/ /usr/local/share/apache/cgi/ AddType application/x-httpd-php-cgi .phm Action application/x-httpd-php-cgi /cgi/php When the following is opened in Apache, I get the following error "Parse error: parse error in /usr/local/share/apache/cgi/php on line 3713" <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Untitled</title> </head> <body> <?php echo phpinfo();?> </body> </html> I've gotten this error on 2 separate FreeBSD servers. I use the PHP4 port in the lang ports collection. PHP works fine from the commandline. It just fails under apache. Ken ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=19378&edit=1

« previous php.bugs (#23258) next »