# time.zone error in php.ini



## time4e (Nov 4, 2012)

I have recently installed piwigo 2.4.5 on a FreeBSD 9 server running Apache/2.2.22 and PHP/5.3.10, when I log into the piwigo site I'm getting errors related to the system's timezone settings. I have updated my /usr/local/etc/php.ini with date.timezone = "America/New_York" but still get errors related to my system time. I have posted the problems on Piwigo's forums http://piwigo.org/forum/viewtopic.php?id=20671 and they suggested that I check to make sure that /usr/local/etc/php.ini is in fact the correct place to set the time. Does anyone have any suggestions to resolve this? How can I get the time zone in php loaded?

Thanks,
-Tim


----------



## usdmatt (Nov 5, 2012)

/usr/local/etc/php.ini is the correct file if you installed PHP from the ports. If it's installed manually it'll use /usr/local/lib/php.ini

With any problem like this, create a small PHP script called test.php or something in the root of the website and put the following in it:


```
<?php phpinfo();
```

When accessed via the browser, it'll output all PHP settings. At the top it'll tell you exactly what ini files have been loaded (Look at *Loaded configuration file* and *additional .ini files parsed*). This output is extremely useful as it shows every setting as your web application sees it, and can also be used to tell if config options have been set globally in the .ini files or overridden locally (apache vhost/.htaccess/etc).

You should also see the timezone you chose as the default timezone in the 'date' section of the output.

If these are right then PHP is picking up your config changes and the problem is somewhere else. What errors are you getting anyway?


----------

