tags:

views:

14

answers:

2

When I try to run my script I at first I put the shebang in the script at the top and then tried this:

php -f /home/phil/www/disable_script.php

But I'm immediately greeted by this:

PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/zlib.so' - /usr/lib/php4/zlib.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Fatal error:  Call to undefined function:  date_default_timezone_set() in /home/phil/www/disable_script.php on line 3

When I just say:

php -v

I get:

PHP Warning:  Unknown(): Unable to load dynamic library '/usr/lib/php4/zlib.so' - /usr/lib/php4/zlib.so: cannot open shared object file: No such file or directory in Unknown on line 0

What should my next step be? Do I need to reinstall php?

A: 

Sounds like there's a setting in your php.ini that is trying to load an extension that it can't find. Check to make sure the extension exists or edit your php.ini so it doesn't try to load the extension.

Also, date_default_timezone_set() is only available in PHP 5.1.0 or later. Your install looks to be PHP4.

jay.lee
A: 

PHP4 is old, ugly and not supported anymore. You should upgrade to PHP5 as soon as possible.

Adam Byrtek