Re: Critical Bug #20887
| From: | Moriyoshi Koizumi | Date: | Thu, 12 Dec 2002 10:59:18 +0000 |
| Subject: | Re: Critical Bug #20887 | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-92401@lists.php.net to get a copy of this message | ||
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 <derick@php.net> 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 Hï]ÈÆ(
> oQ…ÚU\]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
>