douwei7203 2016-04-05 10:27
浏览 136

MongoDB PHP驱动程序无法正常工作

I am having Mac OSX 10+, I am using Xampp im my system. I need to install PHP Mongodb driver to connect it to mongodb for my application but It's not working, I have tried following steps:

  1. Installed Mongodb driver using sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongo
  2. Added extension="mongo.so" to php.ini /Applications/XAMPP/xamppfiles/etc

But after that It's not letting Apache Server to start; if I remove extension="mongo.so" from php.ini then it's able to start again

Method 2:

  1. Installed Mongodb driver using sudo /Applications/XAMPP/xamppfiles/bin/pecl install mongodb
  2. Added extension="mongodb.so" to php.ini /Applications/XAMPP/xamppfiles/etc

But after that It's not letting Apache Server to start; if I remove extension="mongodb.so" from php.ini then it's able to start again

I am able to see the mongo.so and mongodb.so file at location /Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226

Error I am getting in log file of Xampp is given below:

[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 ...
  • 写回答

1条回答 默认 最新

  • dougu1985 2016-04-05 12:16
    关注

    Finally, I got the solution from a Youtube video https://www.youtube.com/watch?v=YStM8_HWxRI

    It's very useful and give you step by step explanation for the same.

    The problem I was getting because I was updating wrong php.ini file, I was updating /Applications/XAMPP/xamppfiles/etc/php.ini instead of /Applications/XAMPP/etc/php.ini

    评论

报告相同问题?

悬赏问题

  • ¥15 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?