Page 1 of 1

[solved] error in apache logs

Posted: Fri May 03, 2013 1:49 am
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

Re: error in apache logs

Posted: Fri May 03, 2013 6:16 pm
by Dr.CSS
Sounds like you didn't set the server time zone...

Re: error in apache logs

Posted: Fri May 03, 2013 6:49 pm
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.

Re: error in apache logs

Posted: Fri May 03, 2013 7:34 pm
by Dr.CSS
Not so sure UTC will work, but glad you figured it out...

http://forum.cmsmadesimple.org/viewtopi ... =8&t=13968

Re: [solved] error in apache logs

Posted: Fri May 03, 2013 7:41 pm
by ethical
oh ok, I assumed it would since that is was gets set by default/

J