我正在使用Mac OSX 10+,我在我的系统中使用Xampp。我需要安装PHP Mongodb驱动程序将它连接到我的应用程序的mongodb但是它没有用,我尝试了以下步骤:
sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo
extension="mongo.so" to php.ini /Applications/XAMPP/xamppfiles/etc
但之后不要让Apache Server启动;如果我从extension="mongo.so"
删除php.ini
,则可以重新开始
方法2:
sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
extension="mongodb.so"
添加到php.ini /Applications/XAMPP/xamppfiles/etc
但之后不要让Apache Server启动;如果我从extension="mongodb.so"
删除php.ini
,则可以重新开始
我能够在位置mongo.so
看到mongodb.so
和/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226
文件
错误我在Xampp的日志文件中得到如下:
[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] AH01232: 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 ...
答案 0 :(得分:-1)
最后,我从Youtube视频中获得了解决方案https://www.youtube.com/watch?v=YStM8_HWxRI
这是非常有用的,并为您提供一步一步的解释。
我遇到的问题因为我正在更新错误的php.ini文件,我正在更新/Applications/XAMPP/xamppfiles/etc/php.ini而不是/Applications/XAMPP/etc/php.ini