Re: Behavior of PHP module vs. PHP cgi

From: Date: Wed, 04 Jun 2008 22:00:56 +0000
Subject: Re: Behavior of PHP module vs. PHP cgi
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-18955@lists.php.net to get a copy of this message
On Wed, 4 Jun 2008, Jesse Santana wrote:
To: php-install@lists.php.net From: Jesse Santana <jsantana@csulb.edu> Subject: [PHP-INSTALL] Behavior of PHP module vs. PHP cgi Can someone explain to me why this script: #!/usr/local/php5/bin/php
You don't need this line for the apache module version of php. This is a shell directive to run the CLI version of PHP, which is not required by the apache PHP module.
<html> <head><title>PHP Test</title></head> <body> <p>If nothing follows this paragraph, PHP is not enabled.</p> <?php phpinfo() ?> </body> </html> Displays perfectly on a system with PHP installed and running as an Apache module - see:
http://eagles.its.csulb.edu/php/phptest.php. Yet displays completely differently when run through PHP compiled as a CGI - see: http://eagles.its.csulb.edu/~jsantana/phptest.php
Looking at the output it seems like this is running the CLI version of PHP. Not the apache module of PHP or the CGI version.
I've noticed this behavior on all PHP versions since 5.2.3 came out. Version 5.2.2 displays correctly when compiled as a CGI as shown here: http://gaggle.its.csulb.edu/~jsantana/phptest.php
This may be running the CGI version of PHP. So there appears to be three different versions of PHP you are running here. It may be that the default behavoir for running PHP as a CGI script has been modified since PHP 5.2.2? HTH Regards, Keith Roberts
Thank you in advance, Jesse Santana Project Lead - Enterprise Services Group Information Technology Services California State University, Long Beach 1250 Bellflower Blvd. Long Beach, CA 90840 Office: (562)985-8511
Fax:     (562)985-8855
----------------------------------------------------------------- Websites: http://www.php-debuggers.net http://www.karsites.net http://www.raised-from-the-dead.org.uk All email addresses are challenge-response protected with TMDA [http://tmda.net] -----------------------------------------------------------------

« previous php.install (#18955) next »