Autoload configuration doesn't load MongoDB classes

断了今生、忘了曾经 提交于 2019-12-05 14:13:29

As Sammaye mentioned in the comments above, it looks like you're simply running an older version of the driver. You can obtain the current version by either dumping Mongo::VERSION or the returned value from phpversion('mongo'). Instructions for installing/upgrading the drive via PECL are also documented; however, we no longer have pre-compiled versions available on GitHub (GitHub will soon be removing repository downloads, although we've recently begun publishing the Windows builds to S3).

I had the same issue because I was changing wrong php.ini file. So I ran the below command

echo phpversion('mongo');

and took Loaded Configuration File which was /Applications/MAMP/bin/php/php5.4.4/conf/php.ini and changed it.

Restarted Apache and it worked.yay!!!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!