Re: [PHP-DEV] [PATCH] PHP-cli ini search path

2007-04-25 Thread Edin Kadribasic
Hi Stas, The problem is with the following scenario: Say your php cli is in /usr/bin/php and /usr/bin is in your path. You change dir to /tmp. Now issue php -v and watch where php looks up its php.ini. main()'s argv[0] will in this case be just "php" since we got called form the path. The code

Re: [PHP-DEV] [PATCH] PHP-cli ini search path

2007-04-25 Thread Stanislav Malyshev
How BSD is different from any other Unix? And as far as I see, tsrm_realpath uses getcwd anyway, so what's the difference? Hannes Magnusson wrote: It fixes the bug on BSDs where the ini is picked up from cwd - and when you do "touch php && php -v" -- Stanislav Malyshev, Zend Products Enginee

Re: [PHP-DEV] [PATCH] PHP-cli ini search path

2007-04-25 Thread Hannes Magnusson
It fixes the bug on BSDs where the ini is picked up from cwd - and when you do "touch php && php -v" On 4/25/07, Stanislav Malyshev <[EMAIL PROTECTED]> wrote: Could you explain - why do you need to use VCWD there? Hannes Magnusson wrote: > Hi all > > Attached is a patch for the PHP-cli php.ini

Re: [PHP-DEV] [PATCH] PHP-cli ini search path

2007-04-25 Thread Stanislav Malyshev
Could you explain - why do you need to use VCWD there? Hannes Magnusson wrote: Hi all Attached is a patch for the PHP-cli php.ini search path feature which fixes two things: a) php.ini from cwd was picked up on BSDs b) "resolves" to correct php-binary-location and picks up the php.ini file from

Re: [PHP-DEV] [PATCH] PHP-cli ini search path

2007-04-23 Thread Edin Kadribasic
Looks good. Ini search path is very broken indeed. Edin On 23/04/2007, at 19.01, Hannes Magnusson wrote: Hi all Attached is a patch for the PHP-cli php.ini search path feature which fixes two things: a) php.ini from cwd was picked up on BSDs b) "resolves" to correct php-binary-location and pi

[PHP-DEV] [PATCH] PHP-cli ini search path

2007-04-23 Thread Hannes Magnusson
Hi all Attached is a patch for the PHP-cli php.ini search path feature which fixes two things: a) php.ini from cwd was picked up on BSDs b) "resolves" to correct php-binary-location and picks up the php.ini file from there The php.ini-from-binary-location feature has never worked properly before