[nycphp-talk] PHP as CGI Binary
Hans Zaunere
hans at newyorkphp.com
Wed Dec 31 17:41:31 EST 2003
> In an impending project, I will most likely have to use PHP
> as a CGI Binary in a shared server environment. Just
> wondering what kind of "gotchas" I should look out for.
Depending on the complexity and scope of the project, the differences
are generally minimal from what I've seen. The big one is permissions -
CGI scripts can be run as their owner/group, rather than that of Apache
itself.
Another thing to consider is that each request to a CGI script is it's
own process, which then exits when finished. This probably isn't hugely
important in most cases, but something to keep in mind. Also, Apache
specific functions (http://php.net/apache) aren't available. Lastly, if
the script works on the command line, it'll generally work as a CGI
(since the CGI/CLI versions of PHP are closely related, vs the Apache
SAPI).
H
More information about the talk
mailing list