mongodb not showing in phpinfo() for windows - php

I am trying to connect MongoDB with my PHP, to use new MongoClient() I need configure "php_mongo.dll" in my php.ini file but after doing that MongoDB info is not showing in phpinfo.
versions I am using are:
PHP 5.5.30, MongoDB 5.2.10
DLL downloaded from "http://windows.php.net/downloads/pecl/releases/mongo/1.5.8/php_mongo-3.2.10-5.5-ts-vc11-x86.zip" and I have 32 bit machine.

I´ve had the same problem in Windows 10 with Apache 2.4 and PHP 5.6. I tried the many version of mongo driver but nothing worked. Then I tried version 1.5 and all works fine now, the error on apache log has gone and MongoDB support are showed in phpinfo(). And another point is you have to start mongodb server for connection.
For more info you can check on official website.
https://docs.mongodb.com/ecosystem/drivers/php/

Related

Unable to configure new MongoDb drivers (php_mongodb.dll) for PHP in WAMP

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.
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.

Missing mysql api extension in mysqlnd driver

I have a variant of this question.
Everything was working fine on my development machine (Mac) but I had to reinstall php with homebrew because I needed the '--with-homebrew-curl' option. PHP got updated from 5.6.18 to 5.6.30. Now the old mysql functions like mysql_connect() aren't working any more, alas they are gone like as if I was using PHP 7, which I'm not.
I have looked at phpinfo and see that under 'mysqlnd'->'API Extensions' it says only 'pdo_mysql,mysqli'. On my production server (where php hasn't been installed with homebrew) it says 'mysql,mysqli,pdo_mysql' and there is an own mysql section.
What has happened to the mysql-support in mysqlnd on my development machine? Can it be because it php went from 5.6.18 to 5.6.30? Can I force homebrew to install 5.6.18? Is it possible to "unlock" mysql in mysqlnd?
Yes, I had added extension=mysql.so in my php.ini, but it turned out that the mysql.so file was not in my extension folder nor anywhere else on my machine. Solved this by downloading the php source and building the extension manually and then copying it into the extension folder.
I have also added this answer to the one #cale_b found so that this one could be closed.

Mongodb driver not loading on php

I am trying to install MongoDB drivers on my PHP Server.
I am running PHP 5.4.22 and I have added php_mongodb.dll to the ext folder of php and restarted my apache service. I have added extension=php_mongodb.dll to my php.ini file.
The version of MongoDB driver is supposed to be working with my php driver (php_mongo-1.6.8-5.4-vc9.dll)
I have read numerous posts and how-to's on the subject but simply can't get it to work.
Please help!
After updating PHP from 5.4.22 to 5.6.20 and switching the mongo.dll driver to the correct version it started working.
Nothing else has changed, only the PHP version and its corresponding driver.

Mongo driver not working with wamp 32 bit

I have 64 bit operating system and 32bit wamp(php 5.5.6) i have installed the mongo driver for php but its not working correctly.I have also tried all Mongo Driver given version with the wamp but its not working.Any one working with this? When i click on the wamp and go to php extensions php_mongo is checked but not show the loaded in phpinfo().

PHP 5.4 & MSSQL - Wampserver

I am trying to update my PHP, MSSQL functions to the newer ones which are supported by PHP 5.4. I have done everything and searched everywhere but I just can't get it to work.
I have installed WampServer 32 Bit to my C: drive and I have installed SQL drivers for PHP. I have made sure that the package I chose was 3.0 (http://www.microsoft.com/en-gb/download/details.aspx?id=20098) and I installed them correctly. I put the 'php_sqlsrv_54_ts.dll' into the ext folder which is in wamp/bin/php/ext and I added the 'extension=php_sqlsrv_54_ts.dll' to the php.ini file which is in wamp/bin/php.
Next I started all the services successfully and then went to my local host to find out that I was receiving this error:
Call to undefined function sqlsrv_connect() in C:\wamp\www\launcher\Login2.php on line 11
Further Information:
Running Windows 7 SP1 Ultimate 64 bit
Download Wamp Server 2 for 32 Bit
Apache : 2.4.4
MySQL : 5.6.12
PHP : 5.4.16
PHPMyAdmin : 4.0.4
SqlBuddy : 1.3.3
XDebug : 2.2.3
Running it on my localhost/127.0.0.1
Using port 8080 in Apache
Enabled pdo extensions in php.
Using the php_sqlsrv_54_ts.dll
Restarted Wamp several times.
I fixed it. I had previously gone into PHP extension via wamp server controls and ticked php_pdo_mssql and php_mssql but now that I have unchecked these I don't get the error anymore but rather a database connect fail. I am not familiar with the new sql server connections. Before I used mssql_connect with my host being as 'Farbod-PC\SQLExpress' I still use this host and it works fine.
after spending 7 hours on it, this was the answer to connect PHP 5.4 to MS SQL server.
edit: or just use php 5.3, as that has native php mssql connectors

Categories