MySQL

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


Apache2.2 + PHP5.2 + mysql/mysqli/pdo_mysql from sketch on Debian sid HOWTO

This simple HOWTO will guide you about how to setup Apache2.2 + PHP5.2 + mysql/mysqli/pdo_mysql from sketch. Compile all package from tarball can give you the maximum flexibility of functionality, e.g. you can enable both mysql/mysqli/pgsql/oci8/pdo_mysql/pdo_pgsql/pdo_oci within single installation.

Before start, I will assume you have Debian sid and MySQL5 installed correctly, which will not detail within this document. In case of Debian, MySQL5 installation is just as simple as a single command:

apt-get install mysql-server-5.0 mysql-client-5.0 mysql-common

This HOWTO is highly similar as my other article which target for install Apache2.2 + PHP5.2 + OCI8/PDO_OCI from sketch on Debian sid. Therefore some duplicated section will directly refer to there, and only mention those different in case for MySQL in here.


Syndicate content