# where is the php.ini



## garrett_44 (Apr 29, 2004)

Hi again

Hi do i find out via the terminal where the php.ini is thats being used by the version of php that is running?  i seem to have several on my system in different folders such as

/usr/local/php/
/usr/lib/php/
/etc/

a+
gar


----------



## Arden (Apr 29, 2004)

Open each in pico, check the versions they list (if you can find it), and compare that to what you get with phpinfo().


----------



## dlloyd (May 1, 2004)

phpinfo() should tell you the path to the php.ini file it's using


----------



## djbeta (Feb 19, 2005)

Hi there.. 
I needed to turn on  Register Globals, so
I found my php.ini.default file, was found at the path 
that the phpinfo() sent me to  -->  /etc
so, I edited it and restarted apache...
but the globals still don't seem to be registered   because my little introduction to variables example isn't working.

from what I've said, does it sound like i edited the right file ???
I was expecting to edit a file named  php.ini
(not php.ini.default)

could someone tell me why I'm not finding the php.ini  file where phpinfo() says it should be ????

thanks !!


----------



## TommyWillB (Feb 20, 2005)

I tried figuring this our but never could... I'm convinced something about Apple's default Apache/PHP configuration simply ignores php.ini.

But I'm sure someone here will correct me if this is wrong.


----------



## djbeta (Feb 20, 2005)

I figured it out !!  there  *is* no php.ini file unless you create one... the php.ini.default is used

so... i just took the default file, edited it.. and saved it back to that folder as php.ini

now everything works the way i want it to..  I guess 10.3 apache looks for php.ini and if it doesn't find it uses the default config... hehe.. i bet that is in httpd.conf file somewhere.. ????


----------



## TommyWillB (Feb 20, 2005)

Okay... so what's the path of the php.ini.default and where did you put php.ini?


----------



## Darkshadow (Feb 20, 2005)

/etc - for both questions.


----------



## djbeta (Feb 20, 2005)

to be sure....  run phpinfo() and it will tell you the exact path of your php.ini (even if you don't really have one) hehhe


----------

