Php.ini is not loading on the local machine mac os x

macmac-osxPHPphp.ini

I have a localhost running on my mac osx machine, everything works fine apart from I get this error when running some applications:

Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings.

So I read up about the error and it suggested I needed to add the following to my php.ini

date.timezone = "Europe/London"
date.default_latitude = 51.500181
date.default_longitude = -0.12619

Which is just located in /etc/php.ini

Restarted apache with sudo /usr/sbin/apachectl restart

The error persisted so I tried adding some erroneous text to the php.ini restarted and everything seemed fine, when I expected it to not load.

I made a phpinfo file and the it said the Configuration File (php.ini) Path was /etc and the loaded configuration file was /private/etc/php.ini when I edit either of these files the other is updated, so I assume they are symlinked?

I just do not know where to go from here

Best Answer

Check that your added setting is in the correct place in the php.ini file. Configuration of module settings should be after they are loaded. Your added setting may be being overridden further down the file, or in an imported config file.

Related Topic