从5.1升级到PHP 5.2.10后,我得到了以下警告时php -v
:PHP的警告:PHP启动:????????:无法初始化模块
# 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
我怎样才能修理它?谢谢!
'extension_dir'指向'/ user/lib/php/modules',其中有许多'.so'文件。我怎么能告诉这些'.so'文件的版本? THX – ohho 2010-06-28 09:08:00
当你为你的问题做了运行PHP,每个不兼容的模块,您将收到警告消息: 无法初始化模块,模块与模块API编译= 20050922 你的情况不兼容的模块有:FileInfo的,mcrypt的,内存缓存, mhash,mssql,readline和tidy,所以尝试禁用它们,看看它是否有所作为。 – bas 2010-06-28 20:54:51
@Horace:如果您使用的是类Unix的主机,请在扩展名dir:'strings -f * .so | grep API'中尝试此操作。每个.so文件中可能会有多个'API'字符串,但只能在API版本号 – 2010-06-28 21:06:17