On Thu, 3 Apr 2003, Justin French wrote: > Hi, > > I can't believe I've never bothered to learn this stuff, so I apologise for > being totally dumb in advance :P > > phpinfo() tells me my php.ini is being read from /usr/local/lib, however, > there's definitely NOT a php.ini file there.
That faq mentions that if only a directory is listed from phpinfo() then php.ini is NOT being read. For example, from phpinfo(): BAD - not being read /usr/local/lib/ GOOD - oh yeah, it's being read /usr/local/lib/php.ini > So, I went hunting and found this on > http://www.php.net/manual/en/faq.installation.php > > " > 12. How do I know if my php.ini is being found and read? It seems like it > isn't as my changes aren't being implemented. > > To be sure your php.ini is being read by PHP, make a call to phpinfo() and > near the top will be a listing called Configuration File (php.ini). This > will tell you where PHP is looking for php.ini and whether or not it's being > read. If just a directory PATH exists than it's not being read and you > should put your php.ini in that directory. If php.ini is included within the > PATH than it is being read. > > If php.ini is being read and you're running PHP as a module then be sure to > restart PHP after making changes to php.ini > " > My questions are: > > 1. if there's no php.ini in /usr/local/lib, is php using a default set of > settings, or another file (if so, where?)? Yes, the defaults. > > 2. how do I tell php to look somewhere else, or is the solution to > create/copy a php.ini into /usr/local/lib and restart apache? There are a few options. The easiest is to just put a php.ini in the directory it lists. Or, you could set the PHPRC environment variable, or you could use the --with-config-file-path option during compile. Search around for more information on these options. Regards, Philip p.s. I wrote that faq but apparently not good enough :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php