Title: Fatal Error Upon Plugin Update
Last modified: April 28, 2017

---

# Fatal Error Upon Plugin Update

 *  [bassicsax](https://wordpress.org/support/users/bassicsax/)
 * (@bassicsax)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-upon-plugin-update/)
 * When I updated by Better Google Analytics plugin this morning from 1.1.4 to 1.2.3
   I was greeted with a fatal error message.
 * I rolled back the plugin to 1.1.4 and tried again with 1.2.0, but here’s the 
   message I’m getting when I go to the Analytics report tab:
 * Fatal error: Uncaught exception ‘Exception’ with message ‘DateTimeZone::__construct():
   Unknown or bad timezone ()’ in /home/bassicsax/public_html/version5/wp-content/
   plugins/better-analytics/library/DigitalPointBetterAnalytics/Helper/Reporting/
   Abstract.php:685 Stack trace: #0 /home/bassicsax/public_html/version5/wp-content/
   plugins/better-analytics/library/DigitalPointBetterAnalytics/Helper/Reporting/
   Abstract.php(685): DateTimeZone->__construct(”) #1 /home/bassicsax/public_html/
   version5/wp-content/plugins/better-analytics/library/DigitalPointBetterAnalytics/
   ControllerAdmin/Analytics.php(122): DigitalPointBetterAnalytics_Helper_Reporting_Abstract-
   >getWeeklyHeatmap(1, 4, ‘ga:sessions’) #2 /home/bassicsax/public_html/version5/
   wp-content/plugins/better-analytics/library/DigitalPointBetterAnalytics/Base/
   Admin.php(293): DigitalPointBetterAnalytics_ControllerAdmin_Analytics->actionHeatmaps()#
   3 [internal function]: DigitalPointBetterAnalytics_Base_Admin->display_page(”)#
   4 /home/bassicsax/public_html/version5/wp-includes/class- in /home/bassicsax/
   public_html/version5/wp-content/plugins/better-analytics/library/DigitalPointBetterAnalytics/
   Helper/Reporting/Abstract.php on line 685
 * The Analytics widget on my WP dashboard however, is showing traffic and data,
   which does change.
 * Any ideas what may be causing this? It is way above my paygrade. 😉 Any help 
   would be greatly appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [digitalpoint](https://wordpress.org/support/users/digitalpoint/)
 * (@digitalpoint)
 * [9 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-upon-plugin-update/#post-9090206)
 * What time zone so your WordPress set for? (under Admin -> Settings -> General)
 * Also, what version of PHP are you using?
 *  Thread Starter [bassicsax](https://wordpress.org/support/users/bassicsax/)
 * (@bassicsax)
 * [9 years ago](https://wordpress.org/support/topic/fatal-error-upon-plugin-update/#post-9094066)
 * My time zone is set as Vancouver, and the PHP version is 5.4.
 *  Plugin Author [digitalpoint](https://wordpress.org/support/users/digitalpoint/)
 * (@digitalpoint)
 * [9 years ago](https://wordpress.org/support/topic/fatal-error-upon-plugin-update/#post-9095049)
 * If you make a PHP file to show your server’s PHP info like so:
 *     ```
       <?php
   
       phpinfo();
       ```
   
 * Save that to your server and then view that PHP file through your browser (you
   can name it anything you want), you should find a section titled “date” and some
   info about the timezone database it’s using.
 * Normally the “Timezone Database” will be “internal” and you can see the Olson
   Timezone Database Version there. Can you tell me if your server is using the 
   internal database and if so, what version it shows there?
 * Honestly I’m a little perplexed about what’s going on here because in *theory*
   that should never happen like you are seeing there (obviously it is though for
   some reason).
 * I don’t suppose upgrading PHP might be an option just to rule out some weird 
   bug with the PHP DateTimeZone class in old versions? On a side note, PHP 5.4 
   was end of lifed a long time ago and doesn’t even get security updates in a long
   time now: [http://php.net/supported-versions.php](http://php.net/supported-versions.php)
 *  Thread Starter [bassicsax](https://wordpress.org/support/users/bassicsax/)
 * (@bassicsax)
 * [9 years ago](https://wordpress.org/support/topic/fatal-error-upon-plugin-update/#post-9101758)
 * “Olson” Timezone Database Version 2014.8
    Timezone Database internal Default 
   timezone UTC
 * I believe I can change my PHP version I think I saw that option when I check 
   in the CPanel the other day. I’d have to log in again and confirm that.
 * *** Just above the Date boxes, there was this warning:***
 * Warning: 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 the 
   timezone ‘UTC’ for now, but please set date.timezone to select your timezone.
   in /home/bassicsax/public_html/blog/timezone_info.php on line 3
    -  This reply was modified 9 years ago by [bassicsax](https://wordpress.org/support/users/bassicsax/).
 *  Plugin Author [digitalpoint](https://wordpress.org/support/users/digitalpoint/)
 * (@digitalpoint)
 * [9 years ago](https://wordpress.org/support/topic/fatal-error-upon-plugin-update/#post-9115379)
 * If you add this line to your wp-config.php file (at the top or bottom, doesn’t
   matter where), does the error go away?
 * `date_default_timezone_set('America/Vancouver');`
 * It’s a little difficult to debug on this end because I don’t have any servers
   that I can put PHP 5.4 on it.
 * The “date.timezone” setting in your php.ini file is required when using timezone
   functions (the alternative if you can’t edit php.ini is to add the above line
   to your config file since it will at least set it on a per request basis).
 * From the PHP documentation, it looks like PHP 5.4 is the version that changed
   how it works (specifically prior to that PHP would be fine using the time zone
   as set by the server itself). Some info on that here:
    [http://php.net/manual/en/datetime.configuration.php#ini.date.timezone](http://php.net/manual/en/datetime.configuration.php#ini.date.timezone)

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Fatal Error Upon Plugin Update’ is closed to new replies.

 * ![](https://ps.w.org/better-analytics/assets/icon.svg?rev=1170242)
 * [Better Google Analytics](https://wordpress.org/plugins/better-analytics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-analytics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-analytics/)
 * [Active Topics](https://wordpress.org/support/plugin/better-analytics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-analytics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-analytics/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [digitalpoint](https://wordpress.org/support/users/digitalpoint/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/fatal-error-upon-plugin-update/#post-9115379)
 * Status: not resolved