Timezone identifier error for phpMyAdmin 3.1.1 setup

For new phpMyadmin 3.1.1 with Debian Lenny, you may face the following error message during setup with /setup, as:

Runtime Notice in ./libraries/common.inc.php#272
date_default_timezone_get() [function.date-default-timezone-get]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable 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 'Asia/Hong_Kong' for 'HKT/8.0/no DST' instead

This is a support request that already reported to phpMyAdmin user fourm (#72909). In order to fix this error message you will need to retouch your php.ini setup, and specify a correct date.timezone information for your server.

In case of Debian Lenny, follow these procedure:

  1. vi /etc/php5/apache2/php.ini
  2. Search for date.timezone, it should by default as below:
    ; Defines the default timezone used by the date functions
    ;date.timezone =
  3. Change this line according to your location (read http://www.php.net/manual/en/timezones.php for more information), e.g.:
    ; Defines the default timezone used by the date functions
    date.timezone = "Asia/Hong_Kong"
  4. /etc/init.d/apache2 restart

Restart your phpMyAdmin setup procedure and the error message should now run away :D


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <h1> <h2> <h3> <h4> <h5> <h6> <em> <strong> <code> <del> <blockquote> <q> <sub> <p> <br> <ul> <ol> <li> <dl> <dt> <dd> <a> <b> <u> <i> <sup> <acronym> <pre> <img>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Images can be added to this post.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.