php fatal error class 'mongo' not found

102 views
Skip to first unread message

CHENG Sreypov

unread,
Aug 28, 2015, 10:59:36 PM8/28/15
to mongodb-user
Sorry, I know that question is duplicated, I new and start mongo DB today, I can create database and collections but when I start coding I go this message, I used window, I ready follow by this manual  but i still get message  "php fatal error class 'mongo' not found in ...." . please help to give any instruction for me.

Thanks

Jeremy Mikola

unread,
Aug 30, 2015, 12:33:14 AM8/30/15
to mongod...@googlegroups.com
This is most likely a case of not having added the "extension=php_mongo.dll" line to the correct INI file. You should be able to confirm the location of the INI file being used by your PHP runtime by reading the output of:

phpinfo(INFO_GENERAL);

...when executed from a script. The relevant line should read similar to:

Loaded Configuration File => /etc/php5/cli/php.ini

...although you'll no doubt have a Windows path. Additional INI files may be listed, too, for extra modules.

I'll also note that the install docs you referenced link to our S3 bucket, which we were using to publish the DLLs until recently. The PECL website now provides builds of extensions for Windows, so you may want to download a newer version from https://pecl.php.net/package/mongo, as the S3 bucket only has up to version 1.6.8. I'll try to get the install docs updated sometime this week, so we link directly to PECL.

On Fri, Aug 28, 2015 at 5:28 AM, CHENG Sreypov <sreypovc...@gmail.com> wrote:
Sorry, I know that question is duplicated, I new and start mongo DB today, I can create database and collections but when I start coding I go this message, I used window, I ready follow by this manual  but i still get message  "php fatal error class 'mongo' not found in ...." . please help to give any instruction for me.

Thanks

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/0b84c789-dae0-4563-906d-7ac1ae36dcb3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

CHENG Sreypov

unread,
Sep 1, 2015, 3:13:18 AM9/1/15
to mongodb-user
HI 

I search on any site and do as you, I think it's may be problem with PHP version, I get this message when start warm first 




I get this 

CHENG Sreypov

unread,
Sep 1, 2015, 3:14:36 AM9/1/15
to mongodb-user
I can not solve it now :( , I really wonder, I try all by any site


On Saturday, August 29, 2015 at 9:59:36 AM UTC+7, CHENG Sreypov wrote:

Jeremy Mikola

unread,
Sep 1, 2015, 11:47:39 AM9/1/15
to mongod...@googlegroups.com
Based on those errors, I would suggest:
  • Confirm that the php_mongo.dll file actually exists in D:\wamp\bin\php\php5.5.12\ext
  • If the file does exists, it's possible that it is the wrong version for your PHP runtime. If you look at https://pecl.php.net/package/mongo/1.6.11/windows, you'll see there are four variations for the 1.6.11 mongo extension for PHP 5.5. I would start by trying both of the x86 versions (unless you're running a 64-bit PHP build).
If this doesn't help, I would possibly suggest asking on the WAMP forums or Stack Overflow, as this seems more like a WAMP configuration issue and there'd likely be more experienced folks in this area on either of those sites.

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
Reply all
Reply to author
Forward
0 new messages