2011-11-14 69 views
0

如何解決我的PHP啓動警告:PHP 5.3.8啓動預警

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions 
/no-debug-non-zts-20090626/imap.so' - /usr/lib/php/extensions/no-debug-non-zts-20090626 
/imap.so: cannot open shared object file: No such file or directory in Unknown on 
line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions 
/no-debug-non-zts-20090626/mcrypt.so' - /usr/lib/php/extensions/no-debug-non-zts- 
20090626/mcrypt.so: cannot open shared object file: No such file or directory in 
Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions 
/no-debug-non-zts-20090626/memcache.so' - /usr/lib/php/extensions/no-debug-non-zts- 
20090626/memcache.so: cannot open shared object file: No such file or directory in 
Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions 
/no-debug-non-zts-20090626/mysql.so' - /usr/lib/php/extensions/no-debug-non-zts- 
20090626/mysql.so: cannot open shared object file: No such file or directory in 
Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib 
/php/extensions/no-debug-non-zts-20090626/mysqli.so' - /usr/lib/php/extensions 
/no-debug-non-zts-20090626/mysqli.so: cannot open shared object file: No such file or 
directory in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions 
/no-debug-non-zts-20090626/pdo.so' - /usr/lib/php/extensions/no-debug-non-zts-20090626 
/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions 
/no-debug-non-zts-20090626/pdo_mysql.so' - /usr/lib/php/extensions/no-debug-non-zts- 
20090626/pdo_mysql.so: cannot open shared object file: No such file or directory in 
Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions 
/no-debug-non-zts-20090626/suhosin.so' - /usr/lib/php/extensions/no-debug-non-zts- 
20090626/suhosin.so: cannot open shared object file: No such file or directory in 
Unknown on line 0 

我已經在我的config文件夾中的許多配置文件,我不知道他們來自哪裏:

PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d/gd.ini on 
line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d/gd.ini on 
line 2 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d/imap.ini 
on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d/mcrypt.ini 
on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d 
/memcache.ini on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d 
/mysql.ini 
on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d 
/mysqli.ini 
on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d/pdo.ini  
on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d 
/pdo_mysql.ini on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d/xcache.ini 
on line 1 in Unknown on line 0 
PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/conf.d/xcache.ini 
on line 9 in Unknown on line 0 

由於警告我認爲我不需要它們?

+1

你已經做了哪些診斷工作? 這些文件是否存在?你有沒有找到哪個php配置文件或部分加載它們? – MrTrick

+0

我已更新我的問題。我可以刪除這些配置文件嗎?我的PHP正在工作,什麼是susohin,mysql_pdo,mysql_cli等? – Bytemain

+0

mysql_pdo,mysql_cli等是PHP的擴展。 MySQL_pdo允許你使用PDO類連接到mysql數據庫。 IMAP.so允許您通過PHP連接到IMAP服務器。如果您確信服務器上託管的應用程序不需要這些擴展,那麼您可以嘗試刪除它們。 – F21

回答

3

mysql_pdo是用於創建準備好的SQL語句的PHP數據對象擴展。對於mysql_cli,CLI代表命令行界面。對於動態加載警告,在php.ini中有一個指令所謂extension和將類似於以下內容:(這是Windows中,* nix中會略有不同)

extension=php_bz2.dll 
;extension=php_curl.dll 
;extension=php_dba.dll 
extension=php_mbstring.dll 
extension=php_exif.dll 

注意一些怎樣註釋掉了 - 你的php.ini試圖動態加載擴展,無法找到。註釋掉正在加載錯誤擴展的配置文件中的行,或者找到丟失的文件。如果你確定你有擴展文件,但是PHP不能「發現」它們,你可能需要修改php.ini指令extension_dir

0

我通過設置在目錄中的文件模塊的完整路徑/etc/php.d/

解決了這個問題,例如gd擴展: Ÿ只是修改此:

擴展= gd.so

此:

延長=的/ usr/lib64下/ PHP /模塊/ gd.so

因爲。所以文件在/ usr/lib64下/模塊

0

註釋掉在php.ini文件中所造成的誤差這樣的臺詞:

;extension=imap.so

可能的原生支持已經啓用,但在.ini仍然試圖明確地調用擴展,這應該對php的功能沒有影響,但應該刪除錯誤。