|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-01-20 17:29 UTC] danielc at analysisandsolutions dot com
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 04:00:02 2025 UTC |
IMHO this should be closed when: 1) Every possible php-{SAPI}.ini name is listed 2) Where PHP looks for these, and in what order 3) Document every possible way to change this location, including at compile time. Not sure why #22001 was closed but we'll leave it and focus on this one as it's a smaller number :) #3 may want to be a faq but it's important and a topic that PHP users have wondered about for years. In Apache 2 there is a PHPINIDir setting that can be used, does anything similar exist in Apache 1? In Windows show how (or link to how) to set environment variables such as PHPRC, PHPRC as a variable is currently documented. Not sure about IIS... --with-config-file-path should be mentioned on this list as well. There could be more settings, the above are what come to mind.look at Philip's notes. 1) and 2) aren't document. the php-{sapi}.ini should be documented.