Hey everyone. I was hoping to get some help on something that I am working on.
First, I hope this is the right place to post this. Please forgive me if this is the wrong forum.
I am new to PHP as I work mostly as a Sys Admin.
Recently, I have been working on a project running a number of applications on PHP.
I configured a box and a PHP application that has a web interface.
Everything looks good except for when I log into the web interface. I am greeted with this message:
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/www/base/base_main.php on line 138n
I have done a lot of research trying to figure out what is causing this.
A lot of websites and posts on other sites suggested that the fix would be to make a change in the php.ini file in the : date.timezone section.
I did make that change, however the issue still persists.
I decided to make a quick test.php file to read the configuration file and see if I can get additional information.
I opened up the test.php web page and made sure I was reading the correct configuration file. Which, according to the test page, I am.
Moving forward, under the DATE section of the test.php file, I see this:
Warning: phpinfo() [function.phpinfo]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /usr/local/www/apache22/data/test.php on line 2
Which is what I see as well when I log into the application's interface.
Under that date section, it says the following:
Default timezone -- America/Los_Angeles
Which is my timezone.
For a test, I changed the "date.timezone" section in my php.ini file to "America/New York", restarted apache and loaded the config file backup.
Looking at the date section again, the error is still there and the DEFAULT TIMEZONE is still pointing to "America/Los_Angeles".
So it appears that its not reading my config file or I am completely missing something.
Here is the full section of the DATE part of the test.php file:
date/time support enabled
"Olson" Timezone Database Version 2011.4
Timezone Database internal
Default timezone America/Los_Angeles
Directive Local Value Master Value
date.default_latitude 31.7667 31.7667
date.default_longitude 35.2333 35.2333
date.sunrise_zenith 90.583333 90.583333
date.sunset_zenith 90.583333 90.583333
date.timezone no value no value
I have been trying to figure this out for the past few day with no luck.
I was hoping someone might be able to help me out here.
Thanks for the help.
TCG