|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #44823 SAPI way to access request_rec data
Submitted: 2008-04-24 20:30 UTC Modified: -
Avg. Score:4.2 ± 0.8
Reproduced:2 of 3 (66.7%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: Assigned:
Status: Open Package: Feature/Change Request
PHP Version: 5.3CVS-2008-04-24 (CVS) OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-04-24 20:30 UTC]
We have a (really lots) shared extension that require access to the request_rec, but also need to run under either apache 1 or the apache 2 SAPI.

Could we get SAPI function for access (both get and set) the request_rec data, such as:


Reproduce code:
Right now we do things like:

request_rec *r = (request_rec *) SG(server_context);

if (r != NULL) {
  const char *foo = ap_table_get(r->subprocess_env, "foo");

this means we have to build a version of the extension for apache 1 and apache 2.

Expected result:
I would like to do something like this (where XXXX is some new function for r->subprocess_env access):

const char *foo = sapi_XXXX_get("foo");


sapi_XXXX_set("foo", "bar");

This way we could build one sapi module for apache 1 and one for apache 2, but a single shared extension that would work with either.


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 12:01:29 2024 UTC