Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

While doing a tail -f on my httpd error_log I got the following error on every request

[Sun Jun 03 15:52:48 2012] [error] [client] PHP Warning:  PHP Startup: timezonedb: Unable to initialize module
[Sun Jun 03 15:52:48 2012] [error] [client] Module compiled with module API=20050922
[Sun Jun 03 15:52:48 2012] [error] [client] PHP    compiled with module API=20090626
[Sun Jun 03 15:52:48 2012] [error] [client] These options need to match
[Sun Jun 03 15:52:48 2012] [error] [client]  in Unknown on line 0

Any help on fixing this will be very appreciated. Thanks in advance!

share|improve this question
Can you provide the operating system you're using and the version of PHP? – Richard Keller Jun 3 '12 at 12:14
CentOS Linux 5.8, PHP Version 5.3.6 – Barry Kooij Jun 3 '12 at 12:39
up vote 0 down vote accepted

You need to install a newer version of the timezonedb PECL extension. Looks like the version you're using isn't compatible with the version of PHP you're using.

Edit 1: Depending on the OS and version of PHP you're using, PHP might be incorrectly configured to load an external timezonedb extension. Take a look in your PHP config file and see whether this line exists somewhere in it:
If so, comment it out temporarily, and see whether that fixes your problem.

Edit 2: Take a look at the documentation for PECL timezonedb :

This extension is a drop-in replacement for the builtin timezone database that comes with PHP. You should only install this extension in case you need to get a later version of the timezone database than the one that ships with PHP.

In other words, unless you require a newer version of timezonedb than what is shipped with your version of PHP, you shouldn't install it as an external extension. In your case it looks like PHP is trying to load the external extension, which is incompatible with the version of PHP that you're using. Since PHP already has timezonedb built-in, you can safely comment out the line in your PHP config file which loads the external extension.

Edit 3: Try updating the timezonedb extension using the following command:

pecl upgrade timezonedb

If that doesn't work, try the following:

pecl install timezonedb
share|improve this answer
I've comment out the line "" and the error stopped showing up. Is this fixing the problem or just avoiding it? – Barry Kooij Jun 3 '12 at 12:35
Correction: It still shows up. – Barry Kooij Jun 3 '12 at 12:37
I've updated my answer. – Richard Keller Jun 3 '12 at 12:43
Upgrading the timezone did the trick! I did had to re-enable the "" option. Thanks allot! – Barry Kooij Jun 3 '12 at 12:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.