在将php从5.1升级到5.2.10之后,我在php -v时收到了以下警告
# php -v
PHP Warning: PHP Startup: fileinfo: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: mhash: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: mssql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: readline: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: tidy: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP 5.2.10 (cli) (built: Nov 13 2009 11:24:03)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies我怎么才能修复它?谢谢!
发布于 2010-06-28 16:54:18
看起来你还没有升级PHP模块,它们不兼容。
检查php.ini中的extension_dir指令。它应该指向包含5.2模块的文件夹。
创建并打开一个phpinfo文件,然后搜索extension_dir以查找路径。
因为您已经升级了,所以有可能您使用的是指向5.1模块的旧php.ini
发布于 2011-11-11 18:19:55
尝试使用pecl命令升级其中的每个模块
# pecl upgrade fileinfo
# pecl upgrade memcache
# pecl upgrade mhash
# pecl upgrade readline等等。
发布于 2015-09-05 22:26:44
brew reinstall php56-mcrypt --build-from-source
为每个需要用相同版本编译的模块传递--build-from-source标志。
它还可能需要PHP选项,这取决于您的插件。如果是这样的话,brew reinstall php56 --with-thread-safety
要查看phpversion的所有选项,请运行brew options php56 (将56替换为您的版本)
https://stackoverflow.com/questions/3130910
复制相似问题