Mongodb driver not loading on php - 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.

Related

Sqlsrv dll does not properly load on IIS

I am using PHP 7.3 and trying to run sqlsrv but I cannot get my PHP environment to load sqlsrv. I look at the phpinfo and the extension does not show up. These are the steps I have taken.
Through the Web Platform Installer, I have installed PHP 7.3 for IIS, the SQL Server Driver, and the Windows Cache Extension.
I have put php_sqlsrv_73_nts_x64.dll in the extension directory.
I have verified my php.ini configurations.
Downloaded and installed the latest Microsoft ODBC driver.
Found the bug. Turns out I was had installed the SQL Server Driver for IIS when I really needed the SQL Server Driver for IIS Express.

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 not showing in phpinfo() for windows

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/

MongoDb Extension for Yii 2 throwing error of extension not installed

I'm trying to install Yii2 mongo extension, I have already installed the mongo php driver and it showing in phpinfo. Please refer the screenshot for error. I have tried with both mongo and mongodb drivers, none are working.
I have tried the composer command
composer require "mongodb/mongodb=^1.0.0
from
http://us1.php.net/manual/en/mongodb.tutorial.library.php
its still the same output.
Check if there is a second php.ini for CLI version - probably mongodb is not added there (or just commented out). php --ini in console should help you find it. Fix configuration, restart apache and it should be fine.
Mongo driver is deprecated, in place of that mongodb drivers are added for newer version of PHP. Try installing Mongodb driver.
Steps for installation
http://php.net/manual/en/set.mongodb.php
Try with Xamp, I had issue with wamp and mongodb in windows.
refer this link for procedure.

PHP_Mongo Driver for PHP 5.3.8 and WAMP 2.2

I am using WAMP server 2.2. and PHP 5.3.8. I need to connect to MongoDB
from PHP. Can anyone please tell me, which PHP_mongo db is suitable of the drivers available in the following link
https://s3.amazonaws.com/drivers.mongodb.org/php/index.html .
I believe WAMP is compiled using VC9, thread safe, 32bit.
The corresponding DLL file (inside one of the .zip archives) would be: php_mongo-1.4.5-5.3-vc9.dll

Categories