Re: Behavior of PHP module vs. PHP cgi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




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.


Understood.  I just left that in to show that the script I am running is exactly the same.  We don't include this when running PHP scripts through an Apache module.

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.

So how do I force the CGI version?

This may be running the CGI version of PHP. So there appears
to be three different versions of PHP you are running here.

I am running version 5.2.2 on gaggle.  PHP is compiled as a CGI and displays phpinfo() the same as when compiled as an Apache module.  

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



From: Keith Roberts <keith@xxxxxxxxxxxx>
To: php-install@xxxxxxxxxxxxx
Date: 06/04/2008 02:58 PM
Subject: Re: Behavior of PHP module vs. PHP cgi





On Wed, 4 Jun 2008, Jesse Santana wrote:

> To: php-install@xxxxxxxxxxxxx
> From: Jesse Santana <jsantana@xxxxxxxxx>
> Subject: 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]
-----------------------------------------------------------------




[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux