[線上等]ubuntu 下XAMPP php.ini 開啟mongodb 擴充 php檔案總是解析失敗!!!
本帖最後由 gdf87521 於 2013-01-09 23:36:10 編輯
從mongodb 官方拷貝設定檔,配置完畢,重新啟動lampp ,訪問 localhost,總是彈出一個下載對話方塊
,請問下,這個到底錯在哪?我刪除配置,就是正確在。還有,我配置在資訊是放在整個php.ini內容最後面在。
mongo.so 檔案在我的 /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525 目錄下。
extension="mongo.so"
[mongo]
; If the driver should reconnect to mongo
mongo.auto_reconnect = true
; Whether to allow persistent connections
mongo.allow_persistent = On
; Maximum number of persistent connections (-1 means unlimited)
mongo.max_persistent = -1
; Maximum number of links (persistent and non-persistent, -1 means unlimited)
mongo.max_connections = -1
; Default host for mongo connection
mongo.default_host = www.example.com
; Default port for mongo database
mongo.default_port = 42
; When saving files to the database, size of chunks to split them into
mongo.chunk_size = 1024
; Specify an alternate character to $ to use for special db functions ($set, $push, $exists, etc.)
mongo.cmd = "$"
mongo.auto_reconnect = Off
mongo.allow_persistent = On
mongo.max_persistent = -1
mongo.max_connections = -1
mongo.default_host = localhost
mongo.default_port = 27017
mongo.chunk_size = 262400
------解決方案--------------------
沒配置過,看起來這個沒有被正常的解析
這個
extension="mongo.so"
前面有指定擴充位置嗎?沒有寫成完整的路徑看看
------解決方案--------------------
你這個是因為mongo.so的版本不對導致fastcgi都啟動失敗,所以在瀏覽網站的時候php檔案都不能正常解析了.
不信你試一下先把php.ini中關於mongo的配置屏蔽掉重新啟動lampp,保證可以解析php檔案
解決方式是下載和你的作業系統位元相符的monngo,mongo安裝用編譯安裝,不要用rpm方式
------解決方案--------------------
也就是下載.tar.gz壓縮包,解壓縮,然後./configur... make && make install 方式來安裝