How to install the MongoDB driver for PHP 7 on Windows 7? -


i can't seem find clear instructions on how php 7 running on machine windows 7 installed. tried couple of online tutorials, nothing seems have worked out me far. it's possible of may have had experience similar mine , absolutely wonderful if share experience me: specifically, did in order to issue resolved.

here's did:

i downloaded latest dll library php 7 (mongodb-1.1.2.tgz) here: pecl :: package :: mongodb :: 1.1.2, placed file php_mongodb.dll archive ext directory keep php installation, added line extension=php_mongodb.dll php.ini file (after these steps, apache restarted, of course). section mongodb show result of running phpinfo() function:

enter image description here

and i'm trying run simple script:

<?php      $connection = new mongoclient();  ?> 

and following error (i have broken lines little bit better readability):

fatal error: uncaught error: class 'mongoclient' not found in c:\apache24\htdocs\test2.php:3 stack trace: #0 {main} thrown in c:\apache24\htdocs\test2.php on line 3 

mongodb offers its own driver, installation instructions on how set up, after you'll have use the mongodb driver api, rather now obsolete mongoclient way of connecting. if phpinfo() shows mongodb extension working, should able connect using updated syntax:

$client = new mongodb\driver\manager("mongodb://localhost:...."); 

Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -