A Sysadmins blog

I once was 404, but now am 200.

PECL timezonedb fun

without comments

So we have a number of Red Hat based systems where clients use PHP on them. A few clients have requested we update the timezone information on them. Sure no problem.

However “pecl install timezonedb” fails with out of memory errors at 8mb, even though the php memory limit is 32mb or even 64mb on my own machine.

A dirty work around is to install it using


pecl bundle timezonedb
cd timezonedb
phpize
./configure
make
make install

You will need to ensure you have GCC, make, phpize (from php-devel package) installed though.

Currently I have not found a fix or any bugs filled in PECL bug tracker or the Red Hat bug tracker. This is reproducible on CentOS, which is to be expected.

I will update this post if I find a way to fix it or a bug ID in any of those trackers.

Update:

Make sure you have at least these packages installed.


autoconf
automake
libtool
bison
flex

Update 2:

pecl timezonedb will only work with php5 due to no date module existing in the php4 source.

This particular problem manifested because we have php4 and php5 installed on a single server, so clients can use either version as a CGI.

Written by pdeaudney

October 20th, 2008 at 1:08 pm

Posted in linux,systems administration

Tagged with , ,

Leave a Reply