You are right. I verified Apache changes the cwd to / unless it's been launched in single process mode.
And I found results could be different by cases, using DSO or using CGI executable. When you run your script with CGI executable and php.ini is also present in that directory, the PHP binary tries to read that one as mod_cgi tries to chdir to where the script is put. I'm not sure, but this appears to imply some security issues? Moriyoshi Derick Rethans <[EMAIL PROTECTED]> wrote: > On Thu, 12 Dec 2002, Jani Taskinen wrote: > > > On Thu, 12 Dec 2002, Moriyoshi Koizumi wrote: > > > > >Hmm... it's natural that when apache is launched at /, it should read > > >/php.ini because of the current implementation shown below. > > > > > >274 #ifdef INI_CHECK_CWD > > >275 if (strcmp(sapi_module.name, "cli")!=0) { > > >276 if (*php_ini_search_path) { > > >277 strcat(php_ini_search_path, paths_separator); > > >278 } > > >279 strcat(php_ini_search_path, "."); > > >280 } > > >281 #endif > > > > Yeah, but I'm not launching it at /.. > > AFAIK apache always does a chdir('/') when you start it. > > Derick > > -- > > ------------------------------------------------------------------------- > Derick Rethans http://derickrethans.nl/ > PHP Magazine - PHP Magazine for Professionals http://php-mag.net/ > ------------------------------------------------------------------------- > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php