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
using zend_hash_update() can make things worse in this situation.
- new function php_register_pre_request_shutdown(). this way modules
can register callbacks that will be called as soon as execution of
the script is done but *before* any cleanup (global symbol_table etc)
has taken place.
These cannot be implemented platform-independent, so we fall back to the native
non-reentrant versions, but lock during each access (only if ZTS is used).
To initialize/destroy the used data structures, you need to call
reentrancy_startup() before sapi_startup(), and reentrancy_shutdown() after
sapi_shutdown().
system, apache, or php's regex library by using the --with-regex option.
"php" is the default; if you use --with-apache in combination with
Apache 1.3.x, the default is "apache".
and php_regex.h figures out which regex header files to include and
defines symbols that prevents other stuff from including the wrong versions
of regex header files.
moved output-buffering related functions from basic_functions to output.c
Win32 project need to be updated to reflect new position.
# i'm not really happy with this solution, but it seemed the easiest one!
# the whole output code is a bit hard to understand...
@- Output-Buffering system is now Thread-Safe. (Thies)
but they are accessible thru "php_file_le_socket(), php_file_le_uploads()..."
i also updated the ftp, pdf and file-upload stuff to match the new requirements.
@- Cleaned up File-Module (Thies)
yet. That is coming next. Have also only done Apache and CGI so far.
Will have to crack open my ISAPI book to do that one.
Also changed the SAPI output functions to return an int. We'll check
the connection status inside each one, but we might need the return
code at some other level and I don't see a good reason for just tossing
these return codes.
- improve genif.sh to also consider all header files for inclusion
(checks for phpext_)
- use vsnprintf in main.c to avoid buffer overflows
- improve sessions's mm module to cope better with OOM situations
within the shared memory segment
- fix typo wrt session.auto_start
I've defined a few macros to help with module/request init/startup function definitions.
Basically:
PHP_MINIT_FUNCTION(module)
PHP_MSHUTDOWN_FUNCTION(module)
PHP_RINIT_FUNCTION(module)
PHP_RSHUTDOWN_FUNCTION(module)
PHP_MINFO_FUNCTION(module)
These will expand to proper function prototypes.
Now to specify these in the module entry, use:
PHP_MINIT(module)
PHP_MSHUTDOWN(module)
PHP_RINIT(module)
PHP_RSHUTDOWN(module)
PHP_MINFO(module)
I've updated all modules in ext/standard and everything from ext/apache to ext/db.
If you can, please update your module to use these macros.
* Add a few functions to PHP's API.
* Get the MySQL extension up-to-date and thread safe.
* Add a project for building the MySQL extension under Win32.
* There are now -I directives for the absolute path of php4, php4/libzend and the builddir for
the Apache module, so we can #include any php/Zend header.
* Rename config.h to php_config.h
* Changed PHP4 to compile as a DLL, both ISAPI and the the CGI run with the same DLL.
* Switched to using the DLL runtime library under Win32. PHP will NOT work if
compiled against the static library!
* Removed yesterday's php4libts project (with php4dllts, it's obsolete).
This *does* affect thread-unsafe Windows as well - the thread unsafe CGI is also
dependant on the thread-unsafe DLL.
* Add initial ISAPI support. Very very experimental.
* In the thread safe version, generate php4 as a library so that we can link it with both
php.exe and the ISAPI dll. We should probably consider doing that under all circumstances,
under UNIX as well.
The thread-unsafe version *should* be unharmed.