0

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

Khaled
  • 36,533
  • 8
  • 72
  • 99
  • Edit the php.ini file according to the path given in phpinfo, it is the real one. Then restart the server and verify the phpinfo file changed showing the new values placed. – Jhoedram Oct 07 '22 at 04:12

1 Answers1

0

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.

  • Ended up checking the apache error log, it showed there was an error in the php.ini so that is why it was not loading, strange why it still showed it as being loaded properly, it is a good job I am not too busy today – Charles Bryant Dec 30 '11 at 11:57
  • Ah yes it will revert to defaults if apache is unable to parse your php.ini file correctly – Giles Smith Dec 30 '11 at 13:01