LAMP server error Unable to initialize module
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 xxx.xxx.xxx.xxx] PHP Warning: PHP Startup: timezonedb: Unable to initialize module
[Sun Jun 03 15:52:48 2012] [error] [client xxx.xxx.xxx.xxx] Module compiled with module API=20050922
[Sun Jun 03 15:52:48 2012] [error] [client xxx.xxx.xxx.xxx] PHP compiled with module API=20090626
[Sun Jun 03 15:52:48 2012] [error] [client xxx.xxx.xxx.xxx] These options need to match
[Sun Jun 03 15:52:48 2012] [error] [client xxx.xxx.xxx.xxx] in Unknown on line 0
Any help on fixing this will be very appreciated. Thanks in advance!
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:
extension=timezone.so
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
Check more discussion of this question.
Related posts:
Leave a comment
Recent Posts
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?
- Can Windows RDC admin users be immune from being kicked?
- Domain Administrators account policy (After PCI audit)





