Apache2 patch sanity check

php.internals

Rasmus Lerdorf

21 years ago
This patch is to fix http://bugs.php.net/33690 which is caused by the fact that php_handler() in sapi/apache2handler/sapi_apache.c calls apply_config() well before it has allocated SG(server_context) and set ctx->r to the current request_rec. Downstream from that any ini handler that needs something from SG(server_context) is thus out of luck. Following the chain up the backtrace in bug #33690 should make that very clear if you didn't follow my bad explanation. So, this patch simply moves the allocation of the context up before the call to apply_config(). It's not my sapi, and I still don't run Apache2 in anger anywhere, so I'd appreciate a quick sanity check. -Rasmus

Rasmus Lerdorf

21 years ago
Rasmus Lerdorf wrote:
> This patch ...
Ah, crap, an unrelated sapi_get_request_time backport patch snuck in there. Here is the clean patch.