SAPI and down into the individual SAPI modules. I have made the
appropriate changes in all the SAPI modules, but please verify these.
The reason for this change is that Apache sometimes will feed PHP
a request_method of GET but have r->header_only set to true. This happens
in an ErrorDocument redirect. In this same scenario we want to preserve
the status code as well instead of just overwriting it with a 200 and
losing this information. For now the other sapi modules act exactly as
before since they probably do not make this distinction, and they may
not even have a valid response code this early in the request.
@ Fix HEAD request bug on an Apache ErrorDocument redirect and preserve
@ the status code across the redirect as well. (Rasmus)
[6] NEVER USE strncat(). If you're absolutely sure you know what you're doing,
check its man page again, and only then, consider using it, and even then,
try avoiding it.
strncat() is your enemy!
- Fix several SAPI services, get rid of the default_content_type (it's always
composed of the mime type and charset now).
- Win32 works again
@ an ISAPI filter, only as an ISAPI extension, unless you wish to perform
@ authentication using PHP. This didn't yet get enough testing, but it
@ should work (Zeev)
- Fixed auth_user/auth_password memory leak (I didn't have time to test it under
Apache, feedback welcome!)
- Added $HTTP_ENV_VARS[] and $HTTP_SERVER_VARS[] support, which similarly
to $HTTP_GET_VARS[], contain environment and server variables. Setting
register_globals to Off will now also prevent registration of the
environment and server variables into the global scope (Zeev)
- Renamed gpc_globals to register_globals (Zeev)
- Introduced variables_order that deprecates gpc_order, and allows control
over the server and environment variables, in addition to GET/POST/Cookies
(Zeev)
- Got rid of the old flush() implemenetation in favour of the new one
- Added implicit_flush() support to the output buffering layer.
@- Added implicit_flush() to control whether flush() should be called
@ implicitly after any output (Zeev)
implementation now has its own directory under sapi/, just like
extensions have theirs under ext/. To make the final targets appear
in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc
from the selected sapi backend. This is a plan Makefile stub without
any autoconf substitutions. Each SAPI backend also has its own
config.m4 like extensions (read at the end of diversion 2) and
config.h.stub files.
Each SAPI backend has to contain:
config.m4: just like for extensions, this file contains
autoconf/automake directives that end up in the configure script. The
only difference is that the sapi config.m4 files are read in diversion
(output block) 2 instead of 3. The sapi config.m4 files should set
two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET
(the name of the resulting library or program, previously BINNAME).
If they are not specified, they will default to "cgi" and "php",
respectively.
Makefile.inc: has to exist, has to define "INSTALL_IT" to the command
used to install the final target (or ":" for no operation). It also
has to define a plain Makefile rule (without autoconf substitutions)
to build $(SAPI_TARGET)
Makefile.am: just what you think. Make sure your target is called
"libphpsapi_NNN.a", where NNN is the value of PHP_SAPI.
Some testing and fixing probably remains. To make everything hang
together, I've done some ugly tricks that I can imagine causing some
problems. I've built and run the CGI version and built the Apache
DSO.