Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7041917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:06:18+00:00 2026-05-28T02:06:18+00:00

I’m trying to set up MongoDB with PHP and WAMP. I had WAMP 64

  • 0

I’m trying to set up MongoDB with PHP and WAMP. I had WAMP 64 bit installed previously, but I see that the PHP drivers don’t work with that, so I uninstalled it and installed 32 bit. I downloaded the PHP drivers from here: http://downloads.mongodb.org/mongo-latest-php5.3vc9ts.zip, put the dll in ext and added the extension in my php.ini.

I don’t get any errors when I start WAMP, but my phpinfo() doesn’t show Mongo listed, and when I try to something simple like

$m = new Mongo(); // connect

I get this error:

( ! ) Fatal error: Class 'Mongo' not found in C:\development\uswom\btf\test\mongo.php on line 3

My phpinfo shows this information:

Build Date  Aug 23 2011 11:47:20
Compiler    MSVC9 (Visual C++ 2008)
Architecture    x86 
PHP API     20090626
PHP Extension   20090626
Zend Extension  220090626
Zend Extension Build    API220090626,TS,VC9
PHP Extension Build     API20090626,TS,VC9 

When I do php -i from the command line, it shows me that mongo is loaded:

mongo

MongoDB Support => enabled
Version => 1.2.7-

Directive => Local Value => Master Value
mongo.allow_empty_keys => 0 => 0
mongo.allow_persistent => 1 => 1
mongo.auto_reconnect => 1 => 1
mongo.chunk_size => 262144 => 262144
mongo.cmd => $ => $
mongo.default_host => localhost => localhost
mongo.default_port => 27017 => 27017
mongo.long_as_object => 0 => 0
mongo.native_long => 0 => 0
mongo.no_id => 0 => 0
mongo.utf8 => 1 => 1

WAMP is the only php that I have installed, and to make sure that my CLI PHP was matching up with my WAMP phpinfo, I checked the details and they match up:

Build Date => Aug 23 2011 11:47:20
Compiler => MSVC9 (Visual C++ 2008)
Architecture => x86
PHP API => 20090626
PHP Extension => 20090626
Zend Extension => 220090626
Zend Extension Build => API220090626,TS,VC9
PHP Extension Build => API20090626,TS,VC9

Finally, “where php” shows me that command line is running the PHP from my WAMP install:
C:\Program Files (x86)\wamp\bin\php\php5.3.8\php.exe

1) Any idea why CLI “php -i” would show that Mongo is loaded, but phpinfo() doesn’t?

2) I’m guessing that my “new Mongo()” call is failing for the same reason that phpinfo() isn’t showing me that Mongo is loaded, but I’m not sure where to start debugging the Mongo loading issue. I checked wamp/logs/apache_error.log and it shows no errors at startup.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T02:06:18+00:00Added an answer on May 28, 2026 at 2:06 am

    Your question is not clear : can you see that mongo extension on phpinfo() page ?

    If not then know that, often, CLI does not use the same php.ini than Apache (phpinfo()).

    Look for the proper php.ini to edit, usually named php-cli.ini. Chances are that it is in the same folder than php.ini. Sometimes, it is even located in c:\Windows, so look carefully.

    Use “parsed php ini files” in the phpinfo() page, this will get you right to the correct file to edit.

    Also, please confirm that you have only one version of PHP installed, because WAMP can handle many PHP engines per instance.

    hope this helps!

    update : and, as a reminder, restart Apache service at each configuration change

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an if statement in PHP that prevents a single post
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I would like to count the length of a string with PHP. The string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.