NYCPHP Meetup

NYPHP.org

[nycphp-talk] simplexml, gentoo emerge

Ajai Khattri ajai at bitblit.net
Thu Oct 21 11:41:27 EDT 2004


Andrew Yochum wrote:

>
>
>My bad... you're right.  Though you can use PHP as a CGI with just the
>php package, though... I have.  I can't say I have any idea whats in the
>php-cgi package.
>

Yes, true, you can use the command-line PHP in CGI scripts though there 
are subtle differences as the PHP manual states 
(http://www.php.net/manual/en/features.commandline.php):

"Remarkable differences of the CLI SAPI compared to other SAPIs:

    *

      Unlike the CGI SAPI, no headers are written to the output.

    *

      Though the CGI SAPI provides a way to suppress HTTP headers,
      there's no equivalent switch to enable them in the CLI SAPI.

    *

      CLI is started up in quiet mode by default, though the -q and
      --no-header switches are kept for compatibility so that you can
      use older CGI scripts.

    *

      It does not change the working directory to that of the script.
      (-C and --no-chdir switches kept for compatibility)

    * Plain text error messages (no HTML formatting).


Mind you, this makes little practical difference (espec. if you've done 
any perl CGI scripting) - Im just splitting hairs with a very large axe ;-)

-- 
Aj.
Systems Administrator / Developer




More information about the talk mailing list