This patch properly fixes support for CGI in PHP. For backwards compatible
broken behaviour, cgi.fix_pathinfo can be set to zero in php.ini.
CGI failed to work under apache at all, either using the cgi-script directive
or as a ScriptAlias setup. Typicaly it would try to parse itself. This will
still happen if you dissable fix_pathinfo, and set DISCARD_PATH.
This also fixes PATH_INFO, and finally we can run pres2 under cgi or fastcgi.
This patch has been tested under Apache 1.3, 2.0, IIS, as both cgi and fastcgi,
on Windows and OSX. A followup patch with build stuff for linux will follow.
There are 2-3 third-party libs in PHP which use DEBUG and I left them
this way (primary example is pcrelib).
- Please test things and Andrei, can you check that pcrelib stopped
printing the warning messages?
Remove mostly all references to APACHE and CGI_BINARY from the code.
- Apache include files are no longer included by any PHP code, except for the Apache SAPI module.
- No server specific code is in any of the base PHP code.
Still left to be done:
- Eliminate any references to APACHE from the few remaining modules.
- Move request_info.c's logic to SAPI
- Modify the regex function names, and globals, so that we can always
include them, without having to fear any interference with Apache;
Always use the bundled regex library