sapi_getenv segfault
| From: | John Kelly | Date: | Sun, 08 Jun 2003 16:07:15 +0000 |
| Subject: | sapi_getenv segfault | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-2224@lists.php.net to get a copy of this message | ||
Hi,
I made local patches in fopen_wrappers.c to get some apache
environment variables like:
myptr = sapi_getenv("VH_VAR_ROOT", strlen("VH_VAR_ROOT") TSRMLS_CC);
But it's causing a segfault when used in php_fopen_with_path()
However, when used in php_check_open_basedir() it works fine.
I guess something related to the sapi has not been initialized yet
when the problems occurs, but I don't know enough about the PHP source
code yet, to see what that might be.
Can anyone tell me what to check for, before calling sapi_getenv()