1
我有Mac OSX 10+,我正在使用Xampp im我的系統。我需要安裝PHP的MongoDB驅動程序將其連接到MongoDB中我的應用程序,但它不工作,我曾嘗試以下步驟:MongoDB PHP驅動程序無法正常工作
- 使用
sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo
- 新增
extension="mongo.so" to php.ini /Applications/XAMPP/xamppfiles/etc
安裝MongoDB的驅動程序,但之後,它不讓Apache服務器啓動;如果我從php.ini
刪除extension="mongo.so"
那麼它能夠再次開始
方法2:
- 使用
sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
- 新增裝機容量的MongoDB驅動
extension="mongodb.so"
到php.ini /Applications/XAMPP/xamppfiles/etc
但在那之後它不會讓Apache服務器啓動;
[Tue Apr 05 15:48:23.002151 2016] [ssl:warn] [pid 59298] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Apr 05 15:48:23.002443 2016] [ssl:warn] [pid 59298] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 15:48:23.002603 2016] [suexec:notice] [pid 59298] AH: suEXEC mechanism enabled (wrapper: /Applications/XAMPP/xamppfiles/bin/suexec)
[Tue Apr 05 15:48:24.002160 2016] [ssl:warn] [pid 59299] AH01906: www.example.com:443:0 server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Apr 05 15:48:24.002291 2016] [ssl:warn] [pid 59299] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Tue Apr 05 15:48:24.002510 2016] [lbmethod_heartbeat:notice] [pid 59299] AH02282: No slotmem from mod_heartmonitor
[Tue Apr 05 15:48:24.002550 2016] [auth_digest:notice] [pid 59299] AH01757: generating secret for digest authentication ...
:如果我從
php.ini
刪除
extension="mongodb.so"
那麼它能夠重新開始
我能看到mongo.so
和mongodb.so
文件的位置/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226
錯誤我得到的XAMPP的日誌文件如下
/Applications/XAMPP/xamppfiles/etc/php.ini的問題我PHP版本是5.6.19 –
http://stackoverflow.com/questions/33165264/mongodb-php-driver-causing-apache-on-xampp-os-x-to-fail?rq=1 此鏈接是相同的問題,但沒有結果 –