PHP5.3.3安裝memcache的問題
本人按照網上的教程安裝memcache,但是就無法成功使用memcache,在進程裡是有進程memcached.exe的進程在跑著,在命令列裡打php,出現一個memecache警告錯誤,內容如下:
PHP Warning: PHP Startup: memcache: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC6
PHP compiled with build ID=API20090626,TS,VC9
These options need to match
in Unknown on line 0
本人的PHP版本是5.3.3,難道要換一個版本?有什麼好的方法解決呢?
------解決方案--------------------
引用:
PHP Warning: PHP Startup: memcache: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC6
PHP compiled with build ID=API20090626,TS,VC9
These options need to match
in Unknown on line 0
PHP源碼經過編譯後, 有幾個需要注意的地方:編譯器,安全執行緒,調試,版本
編譯器指編譯時間使用的編譯器.
安全執行緒指是否開啟了PHP的安全執行緒層.
調試指是否開啟了PHP偵錯模式.
Module compiled with build ID=API20090626,TS,VC6
PHP compiled with build ID=API20090626,TS,VC9
這兩句是說:
模組使用了20090626發行版的php構建工具, 開啟安全執行緒, 未啟用偵錯模式, 編譯器為VC6
PHP使用了20090626發行版的php構建工具, 開啟安全執行緒, 未啟用偵錯模式, 編譯器為VC9
所以, 你的問題在於兩者使用了不同的編譯器編譯了.
因此, 你需要用VC9以安全執行緒非偵錯模式重新編譯一下你的memcache模組. 或者你從網上找別人編譯好的.