Support » Plugin: Autoptimize » Warning in apache error log

  • Resolved Dailybits

    (@namreh)


    I’m getting these warnings in my error_log from the autooptimize plugin.

    [Sun May 18 14:48:27 2014] [warn] [client 80.56.100.217] mod_fcgid: stderr: PHP Warning: strtotime(): 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 ‘Europe/Berlin’ for ‘CEST/2.0/DST’ instead in /var/www/vhosts/…./wp-content/cache/autoptimize/autoptimize_762d3f4028d11a0ab8703fef0ab28813.php on line 51, referer: …..

    https://wordpress.org/plugins/autoptimize/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Frank Goossens

    (@futtta)

    Thanks for the info Namreh, but this is something that AO can’t solve for you I’m afraid; when working in non-static mode (i.e. the optimized CSS & JS-files are not stored as static files, but instead served by PHP to make sure cache & compression are taken care off), AO has to juggle with timestrings to see if a 304 can be returned.

    To do so, it indeed uses strtotime(), but that function prefers the timezone set explicitly either in code (using date_default_timezone_set(), but I don’t know the timezone of the server on which AO is installed) or in PHP config (date.timezone, cfr. http://php.net/manual/en/datetime.configuration.php#ini.date.timezone).

    Conclusion; you should explicitely set a timezone in your PHP config and the warning will disappear.

    Hope this helps,
    frank

    Thread Starter Dailybits

    (@namreh)

    Thx. I will ask my host to perform this action.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning in apache error log’ is closed to new replies.