我試圖在我的CentOS5機器上使用yum
找到一種簡單的方法來升級PHP,而不是自己下載源代碼並重新編譯它(我上次做了它,但它確實很難以獲得與CentOS默認相同的所有編譯配置)。無論如何,我終於使用下列的方法: http://www.atomicorp.com/wiki/index.php/PHP在CentOS上使用yum升級PHP到5.2.12
現在,命令php -v
顯示版本是5.2.11已經(我需要),但它始終包含像許多警告:
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: 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
我認爲這基本上意味着我需要重新編譯這四個模塊,我怎麼能這樣做?任何建議表示讚賞。
我同意你的意見。然而,我必須堅持CentOS(這是製作服務器環境,開發者最好是相同的)。其實,我發現我可以使用'yum升級php-mssql php-mcrypt'去除警告,但對於其他兩個,我沒有哪兩個模塊可以調用。 – WilliamLou 2010-02-05 23:03:46
好的。我弄明白了,運行:pecl upgrade fileinfo,memcache – WilliamLou 2010-02-06 00:16:36