0

I want to work with PHP and MongoDb, but I'm not able to configure new MongoDb drivers for PHP. I have tested with old MongoDb drivers (php_mongo.dll) it's working fine.

Steps I had done to configure new MongoDb drivers :

1] Downloaded latest mongodb drivers (php_mongodb-1.3.1-7.1-ts-vc14-x64.zip).

2] Copied php_mongodb.dll at both directories for safer side :

a) C:\wamp64\bin\php\php5.6.25\ext

b) C:\wamp64\bin\php\php7.0.10\ext

3] Added line extension=php_mongodb.dll at the end of php.ini @C:\wamp64\bin\apache\apache2.4.23\bin\php.ini

4] Restarted WAMP server and tested if drivers configured at "http://localhost:90/?phpinfo=1", But there is nothing like "mongo" there.

If I do all above steps for old drivers (php_mongo.dll) then it's showing "mongo" section at "http://localhost:90/?phpinfo=1".

System and Application versions

Windows 10 64 bit

WAMP Server 3.0.6

PHP 5.6.25

php_mongodb-1.3.1-7.1-ts-vc14-x64.zip driver

Please correct me if I'm doing anything wrong, or if something missing.

1 Answer 1

1

Issue resolved, I was using "php_mongodb-1.3.1-7.1-ts-vc14-x64.zip" driver for both PHP versions (5.6 and 7.0).

How to resolve this issue : Download "php_mongodb-1.1.8-5.6-ts-vc11-x64.zip" extract zip and copy "php_mongodb.dll" at "C:\wamp64\bin\php\php5.6.25\ext".

Then do it same for 7.0 , download "php_mongodb-1.1.8-7.0-ts-vc14-x64.zip" extract zip and copy "php_mongodb.dll" at "C:\wamp64\bin\php\php7.0.10\ext".

Apart from dll version, everything else done in above steps (4 Steps in question) was prefect.

Above drivers downloaded from https://pecl.php.net/package/mongodb/1.1.8/windows, here you will have list of MongoDb drivers for PHP, along with compatible PHP version.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.