From:             [EMAIL PROTECTED]
Operating system: Windows NT 4.0
PHP version:      4.3.0
PHP Bug Type:     *Configuration Issues
Bug description:  cli execution doesn't find php.ini

Hi:

Please pardon the initial background if it's irrelevant, but I figured it
may come into play somehow...

Been using PHP for years, just fine.  It's installed in f:\progra~1\php. 
That dir is in my Path, so I keep the php.ini and various dll's there to
make upgrading easy.

Installed latest version, 4.3.0, by moving old version to backup directory
and unzipping binaries into f:\progra~1\php.

Edited php.ini to my tastes.

After running into problems with CLI not finding my php.ini file, I ran
some tests.  The test script contains:

   echo 'include_path...  ' . ini_get('include_path') . "\n";
   echo 'cfg_file_path... ' . get_cfg_var('cfg_file_path') . "\n";

Now I open up command line window and execute:
   > cd progra~1\php
   > php ./script

Has the right output:
   include_path...  .;f:\progra~1\pear
   cfg_file_path... F:\PROGRA~1\php\php.ini

But, running the CLI does not:
   > cli\php ./script

   include_path...  .;c:\php4\pear
   cfg_file_path...

If I copy php.ini to the cli directory, the expected results are
obtained.

One assumes the CLI version would be smart enough to look up one directory
level or in the Path for the php.ini.

Of course, I can specify the config file via the -c flag, but that's
awkward for general use and is counter-intuitive.

I hope the behavior of the CLI executable will be changed accordingly,
please.

Thanks,

--Dan
-- 
Edit bug report at http://bugs.php.net/?id=21783&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=21783&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=21783&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=21783&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=21783&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=21783&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=21783&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=21783&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=21783&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=21783&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=21783&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=21783&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=21783&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=21783&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=21783&r=gnused

Reply via email to