From: [EMAIL PROTECTED] Operating system: PHP version: 5.3CVS-2008-04-24 (CVS) PHP Bug Type: Feature/Change Request Bug description: SAPI way to access request_rec data
Description: ------------ 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: r->headers_in r->headers_out r->subprocess_env r->notes 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"); or 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. -- Edit bug report at http://bugs.php.net/?id=44823&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44823&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44823&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44823&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=44823&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=44823&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=44823&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=44823&r=needscript Try newer version: http://bugs.php.net/fix.php?id=44823&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=44823&r=support Expected behavior: http://bugs.php.net/fix.php?id=44823&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=44823&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=44823&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=44823&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44823&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=44823&r=dst IIS Stability: http://bugs.php.net/fix.php?id=44823&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=44823&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=44823&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=44823&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=44823&r=mysqlcfg