Fatal error: Class 'Mongo' not found in C:\\Apache Software Foundation\Apache2.2\htdocs\sample\testdb.php

后端 未结 2 509
囚心锁ツ
囚心锁ツ 2021-01-28 03:39

Fatal error:

Class \'Mongo\' not found in C:\\Apache Software Foundation\\Apache2.2\\htdocs\\sample\\testdb.php

Can anyone help

相关标签:
2条回答
  • 2021-01-28 03:55

    Make sure you have the correct php driver installed.

    For example if "Thread Safety" is enabled in your php.ini, then make sure you have the "Thread-Safe Mongo Extension" installed and NOT the "Non-Thread-Safe" version.

    0 讨论(0)
  • 2021-01-28 04:15

    You're probably using an older version of the Mongo DB driver. The class Mongo has been replaced with MongoClient, since v 1.3.0 of the driver. See this stackoverflow thread :

    1. mongo DB - php driver version
    2. http://www.php.net/manual/en/class.mongo.php
    0 讨论(0)
提交回复
热议问题