Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install MongoDb driver for zend server(PHP)

I am using php 5.2 version and I have installed mongodb driver in zend server. Also Added extension parameter in php.ini file i.e extesnions=mongoddb.dll.

however when I run phpinfo page on my local machine, there is no mongodb details displayed.

Any idea, how to install mongodb driver on zendserver, pls. guide me

like image 460
flex Avatar asked Jan 20 '26 23:01

flex


1 Answers

I would check that you have the correct path to the php.ini used by Zend Server .. by default this should be:

C:\Program Files\Zend\ZendServer\etc\php.ini

You can confirm this by creating a test.php containing:

<?php phpinfo(); ?>

View test.php (as served through Zend Server) in a web browser and search for "Configuration File (php.ini) Path" to verify the ini path.

The additional line to add to php.ini is:

extension=php_mongo.dll

Assuming you download the correct 32- or 64-bit Windows zip from: https://github.com/mongodb/mongo-php-driver/downloads

.. you'll want to copy & rename the appropriate DLL from the zip, which should be similar to:

php_mongo-1.2.10-5.2-vc9-nts.dll => C:\Program Files\Zend\ZendServer\lib\php_extensions\php_mongo.dll

After installing the extension and restarting Zend Server, would suggest you revisit the test.php (phpinfo) output to confirm the "mongo" extension is now enabled.

like image 59
Stennie Avatar answered Jan 23 '26 12:01

Stennie