> ??? 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. -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php