Re: Bug #20887 (Two separate issues)

From: Date: Thu, 12 Dec 2002 20:54:07 +0000
Subject: Re: Bug #20887 (Two separate issues)
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-92433@lists.php.net to get a copy of this message
Note that the patche is still incomplete because it dismisses many *nix OS out there other than SunOS, Linux, FreeBSD, OpenBSD and NetBSD. Moriyoshi "Sara Golemon" <pollita@php.net> wrote: > > ??? The original report goes: > > > > If /php.ini exists, that one is used no matter what PHPRC env is set > > or compiled in when starting up apache from a SysV script. Is it a bug > > in php, or could it be the Mandrake Linux 9.0 system? > > > My bad, the fact does remain however, that there is a command line issue. > > >> the system checks the PATH variable to find an executable and run PHP. > >> When php_ini.c runs, it finds a 'binary_location' of "php" > >> (inaccurate! Our CWD is ~ and ~/php does not exist) Neither my patch > >> nor Moriyoshi's fixes this. > > > > My patch would give the accurate location of the binary being executed > > since it doesn't rely on argv[0]. > > > Once again, my bad... When I tested your patch on my system I forgot about > the fact that the php found in the path would be my copy of 4.2.3 and > would therefore not have your patch! Whoops... :) > > I retested with sapi/cli/php put into the path and lo-and-behold: > open("/usr/local/bin//php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or > directory) > open("/usr/local/lib/php-cli.ini", O_RDONLY) = -1 ENOENT (No such file or > directory) > open("/usr/local/bin//php.ini", O_RDONLY) = -1 ENOENT (No such file or > directory) > open("/usr/local/lib/php.ini", O_RDONLY) = 3 > > Exactly the right behavior! > > +1 your patch. > >

« previous php.dev (#92433) next »