#21783 [Opn]: cli execution doesn't find php.ini
| From: | philip@php.net | Date: | Tue, 21 Jan 2003 03:05:32 +0000 |
| Subject: | #21783 [Opn]: cli execution doesn't find php.ini | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969351143@lists.php.net to get a copy of this message | ||
ID: 21783
Updated by: philip@php.net
Reported By: danielc@analysisandsolutions.com
Status: Open
Bug Type: Documentation problem
Operating System: Any
PHP Version: 4.3.0
New Comment:
On a related note, I heard rumors that as of 4.3.0 ini files such as
php-cli.ini and php-cgi.ini are looked for first, is this true? If not
found, php.ini is looked for.
Previous Comments:
------------------------------------------------------------------------
[2003-01-20 20:52:26] edink@php.net
Point taken :)
A cross reference to the info about the location of php.ini file
(/manual/en/configuration.php#configuration.file) should be inserted on
features.commandline page.
------------------------------------------------------------------------
[2003-01-20 20:46:58] danielc@analysisandsolutions.com
Thank you for that link. None the less, people reading the
features.commandline.php won't necessarily read the configuration.php
page.
Gee, take me for example! :) I spent a significant amount of time
trying to figure out what was going on. Checked the command line page
in the manual, all of the user comments, the newsgroup archives and the
bug database. All of which turned up nothing, hence my bug report.
So, a simple mention of the situation and a cross reference link to
configuration.php would be helpful.
Heck, I'm fairly PHP literate and a good sleuth, but wound up using
your time anyway. This minor documentation tweak will save everyone
grief in the long run.
Of course, I could add a user comment, but that doesn't have the same
impact.
Thanks for your consideration,
--Dan
------------------------------------------------------------------------
[2003-01-20 19:51:29] edink@php.net
PHPRC environmental variable (and other ways of finding it) are
documented at:
http://www.php.net/manual/en/configuration.php#configuration.file
------------------------------------------------------------------------
[2003-01-20 19:44:22] danielc@analysisandsolutions.com
Okay. Then, can you please change this into a documentation bug? The
features.commandline.php pages should really explain this.
For the clarity of other people reading this, the simple, long-term
solution is creating an environment variable named PHPRC and setting it
to the path of where your php.ini file resides. For example,
"c:\progra~1\php"
Thanks,
--Dan
------------------------------------------------------------------------
[2003-01-20 19:05:54] edink@php.net
This is how cli is designed to work (not to look for php.ini in the
current working directory) and it won't change.
You can achieve the desired behaviour by issuing:
set PHPRC=.
on the command line, or setting this environmental variable elsewhere
in the system.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21783
--
Edit this bug report at http://bugs.php.net/?id=21783&edit=1