I just canβt find clear instructions on exactly how you do it for PHP 7 running on a computer with Windows 7. I tried a couple of online lessons, but so far nothing has worked out for me. Perhaps some of you may have had an experience similar to mine, and it would be absolutely wonderful if you could share this experience with me: specifically, what exactly did you do to solve this problem.
Here is what I did:
I downloaded the latest dll library for PHP 7 (mongodb-1.1.2.tgz) here: PECL :: Package :: mongodb :: 1.1. 2 , put the php_mongodb.dll file from the archive into the ext directory, where I continue to install PHP, added the line extension = php_mongodb.dll to the php.ini file (after all these steps, Apache was restarted, of course). The mongodb section appears as a result of running the phpinfo () function:

And now I am trying to run this simple script:
<?php $connection = new MongoClient(); ?>
And I will return to the following error (I broke the lines a bit for better readability):
Fatal error: Uncaught Error: Class 'MongoClient' not found in C:\Apache24\htdocs\test2.php:3 Stack trace:
source share