I just encountered a PHP fatal error when running my cron.php:
Fatal error: Call to undefined function timezone_open() in /MYSERVERPATH/httpdocs/sites/all/modules/date/date_api.module on line 607A quick Google search, and I found the issue is documented here. The solution is to enable the Date PHP4 module. But, this issue does not happen in our production environment, so I decided to compare PHP versions:
# on the production server:
$ php -v | head -1
PHP 5.2.8 (cli) (built: Dec 9 2008 14:03:11) It turns out, a fully updated installation of Centos 5.2 only supplies PHP 5.1.x. So, I decided to upgrade PHP in my development environment according to this documentation.
I created a new yum repo file:
$ sudo emacs /etc/yum.repos.d/utterramblings.repo
# FILE CONTENTS - START
[utterramblings]
name=Jason's Utter Ramblings Repo
baseurl=http://www.jasonlitka.com/media/EL$releasever/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://www.jasonlitka.com/media/RPM-GPG-KEY-jlitka
# FILE CONTENTS - ENDAnd, ran another yum update:
$ sudo yum update
# ...snip...
Resolving Dependencies
# ...snip...
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
apr i386 1.2.12-2.jason.1 utterramblings 257 k
apr-util i386 1.2.12-5.jason.1 utterramblings 159 k
httpd i386 2.2.8-jason.3 utterramblings 2.5 M
mod_ssl i386 1:2.2.8-jason.3 utterramblings 314 k
mysql i386 5.0.58-jason.2 utterramblings 6.4 M
mysql-server i386 5.0.58-jason.2 utterramblings 10 M
pcre i386 7.6-jason.1 utterramblings 562 k
php i386 5.2.6-jason.1 utterramblings 3.7 M
php-cli i386 5.2.6-jason.1 utterramblings 2.6 M
php-common i386 5.2.6-jason.1 utterramblings 481 k
php-devel i386 5.2.6-jason.1 utterramblings 568 k
php-gd i386 5.2.6-jason.1 utterramblings 320 k
php-ldap i386 5.2.6-jason.1 utterramblings 56 k
php-mbstring i386 5.2.6-jason.1 utterramblings 1.3 M
php-mssql i386 5.2.6-jason.1 utterramblings 61 k
php-mysql i386 5.2.6-jason.1 utterramblings 258 k
php-odbc i386 5.2.6-jason.1 utterramblings 112 k
php-pdo i386 5.2.6-jason.1 utterramblings 159 k
php-pear noarch 1:1.6.2-1.jason.1 utterramblings 418 k
php-soap i386 5.2.6-jason.1 utterramblings 342 k
php-xml i386 5.2.6-jason.1 utterramblings 316 k
php-xmlrpc i386 5.2.6-jason.1 utterramblings 130 k
subversion i386 1.4.4-jason.1 utterramblings 4.3 M
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 23 Package(s)
Remove 0 Package(s)
Total download size: 35 M
Is this ok [y/N]: After updating all these packages, I checked out my new PHP version:
$ php -v | head -1
PHP 5.2.6 (cli) (built: May 5 2008 10:32:59) Now, my PHP fatal error has been resolved :)










Fatal error: Call to undefined function timezone_open - again
Hi all,
I follow guide and I update without error from 5.1.6 to 5.2.14: complete!
But when I ask PHP version:
# php -vFailed loading /usr/lib/php/modules//php_ioncube_loader_lin_5.1.so: /usr/lib/php/modules//php_ioncube_loader_lin_5.1.so: undefined symbol: zend_unmangle_property_name_ex
PHP 5.2.14 (cli) (built: Aug 27 2010 16:40:16)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
Can someone give me a tip?
Best,
Biliards.
new version
Looks like you need to install a new version of Ioncube: http://www.ioncube.com/loaders.php
another error on a new virtual machine
I just setup a new Centos virtual machine and I encountered a similar error:
Fatal error: Call to undefined function date_create() in /var/www/my/path/httpdocs/sites/all/modules/date/date_api.module on line 642Sure enough, fresh install of Centos comes with PHP 5.1.6:
Eric@VirtualBox-Centos ~]$ php -vPHP 5.1.6 (cli) (built: Apr 7 2009 08:00:04)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
Thanks It is working fine for
Thanks
It is working fine for me.
Thanks a lot for your great article