Page 1 of 1

php.ini vs php.ini.default

Posted: Fri Mar 11, 2005 7:42 pm
by textheavy
When I run the function phpinfo() through a browser I get this path to php.ini:

/usr/local/php/lib/

When I run the same function in a command-line script I get this path to php.ini:

/etc/

Now, there is no php.ini in the /etc/ directory. There's only a php.ini.default file.

Does this mean that when I run a command-line PHP script it's loading php.ini.default?

The extensions_dir in both of these files is set to "./"

Now, when I run a script from the command line (and it references the /etc/php.ini.default file) it does not load GD.

My question is, should I change the extensions_dir in php.ini.default to point to /usr/local/php/lib ?

Thanks for any advice.

Posted: Fri Mar 11, 2005 8:15 pm
by feyd
Why not try changing the .default one to find out definitively?

Posted: Fri Mar 11, 2005 9:25 pm
by Ambush Commander
It probably shouldn't ever, ever look for php.ini.default. It's not a ini file.

Posted: Sat Mar 12, 2005 5:27 am
by Chris Corbyn
Use the -c flag in the command line to change the ini location, or you could maybe copy the other php.ini into /etc/ - not sue if that works :?