Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Where is PHP.INI file

I want to change few setting in php.ini which phpinfo.php shows it is in /etc but when look it is not there. I did a search using locate php.ini and cannot find it.

Any idea where Mac keep it?

Thanks in advance.

MacBookpro 17", Mac OS X (10.6.3)

Posted on Jun 1, 2010 2:18 AM

Reply
18 replies

Jun 4, 2010 9:54 AM in response to alkhater

alkhater wrote:
I have removed all other apache and php from the system. Searching via locate in terminal, I found only one php.ini, and it is in /etc, and it is the one I copied from default.php.ini
but when change any setting in it it does not show in phpinfo.php


Are you restarting Apache after changing the settings?

Jun 26, 2010 10:20 PM in response to etresoft

I had a similar issue. I found a php.ini in several directories for example:
/usr/local/php5/lib/php.ini

In the end the only way I could get the phpinfo to show the correct value was to either put the php.ini file in /etc/ or to make a symbolic link (ln -s /usr/local/php5/lib/php.ini php.ini) within the /etc/ directory. No location that the php.ini file was created would work, and the .default file is not read either. Lesson learned.

Restart web sharing in the control panel afterwards.
Works on 10.4 and 10.5 that I tried.

Jun 27, 2010 9:18 AM in response to etresoft

etresoft wrote:
dps098 wrote:
I had a similar issue.


No, you didn't.


According to this site:
http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-mac-os-x-1 05/

" Leopard has an empty configuration file by default, but provides a file which you can use as a template."

It goes on to say that you have to create a php.ini based on php.ini.default, like I needed to do.

I'm pretty sure I have the default php5 that ships with 10.5.

Where is PHP.INI file

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.