添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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?

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.

before that extension list (the .so's resp. dll's on Windows) the php.ini says:

;   extension=/path/to/extension/msql.so
; If you only provide the name of the extension, PHP will look for it in its
; default extension directory.

I had luck with giving an explict path, i.e.

extension=d:\dev\fronker\php\ext\php_openssl.dll
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.