[solved] error in apache logs

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
ethical
Forum Members
Forum Members
Posts: 45
Joined: Fri Jan 12, 2007 11:48 pm

[solved] error in apache logs

Post by ethical »

ok so am using the most recent version of cmsms and i see this error filling up the apache logs on the server.

any thoughts on a solution

Code: Select all

PHP Warning:  strtotime() [<a href='function.strtotime'>function.strtotime</a>]: 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/New_York' for 'EDT/-4.0/DST' instead in /home/user/public/plugins/function.cms_stylesheet.php on line 181
Last edited by ethical on Fri May 03, 2013 7:40 pm, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: error in apache logs

Post by Dr.CSS »

Sounds like you didn't set the server time zone...
ethical
Forum Members
Forum Members
Posts: 45
Joined: Fri Jan 12, 2007 11:48 pm

Re: error in apache logs

Post by ethical »

thanks for pointing me in the right direction. Now I will actually provide a detailed answer and solution for those that come along after me so that this becomes a more helpful forum.

The server's timezone was set on the server correctly (I checked that) but cmsms doesn't like relying on that timezone with the way its coded and wants you to set your own timezone.

you can't set the timezone from within the cmsms admin area (why not? I don't know but seems like it would be a useful spot to allow it as opposed to editing a file)

you have to manually edit the config.php file and look for this like

Code: Select all

$config['timezone'] = ''; 
in my case it was blank likely due to the fact that this was installed years ago and i just kept upgrading and cmsms didnt correct the timezone thing as we went along upgrading.

so now change it something like:

Code: Select all

$config['timezone'] = 'America/New_York'; 
or

Code: Select all

$config['timezone'] = 'UTC'; 
which is the default for the cmsms install nowadays.


dont forget to set the config.php file back to 444 permissions after you edit it.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: error in apache logs

Post by Dr.CSS »

Not so sure UTC will work, but glad you figured it out...

http://forum.cmsmadesimple.org/viewtopi ... =8&t=13968
ethical
Forum Members
Forum Members
Posts: 45
Joined: Fri Jan 12, 2007 11:48 pm

Re: [solved] error in apache logs

Post by ethical »

oh ok, I assumed it would since that is was gets set by default/

J
Post Reply

Return to “CMSMS Core”