duanci1939 2012-03-22 11:25
浏览 11
已采纳

无法加载mongo扩展名

Suddenly I started getting the following error:

Fatal error: Class 'Mongo' not found in /var/www/html/index.php

What could be the reason? phpinfo() and php -m is not showing mongo extension.

extension=mongo.so is present in correct loaded .ini file.

I even restarted the Apache server, but the problem remains.

phpinfo():
Loaded Configuration File   /etc/php.ini 

/etc/php.ini
extension=mongo.so

It was working earlier and I was able to connect to mongod server by new Mongo().

  • 写回答

3条回答 默认 最新

  • dongshi8359 2012-03-22 11:41
    关注

    It appears you have removed the comment on the wrong line, so it made your php.ini unreadable and so Mongo wasn’t loaded.

    If you want to enable error_reporting you should edit that line:

    error_reporting: E_ALL & ~E_NOTICE
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False
  • ¥16 Qphython 用xlrd读取excel报错
  • ¥15 单片机学习顺序问题!!
  • ¥15 ikuai客户端多拨vpn,重启总是有个别重拨不上
  • ¥20 关于#anlogic#sdram#的问题,如何解决?(关键词-performance)
  • ¥15 相敏解调 matlab
  • ¥15 求lingo代码和思路
  • ¥15 公交车和无人机协同运输
  • ¥15 stm32代码移植没反应