[]ubuntu 上XAMPP php.ini 開啟mongodb 擴充 php檔案總是解析失敗!

來源:互聯網
上載者:User
[線上等]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 方式來安裝
  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.