3

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

hakre
  • 193,403
  • 52
  • 435
  • 836
flex
  • 185
  • 5
  • 19
  • Check out the [installation guide](http://www.php.net/manual/en/mongo.installation.php#mongo.installation.windows). If you're using windows then you have to download the binaries for your PHP-version, for any other OS you can just compile it using pecl. – vstm Jun 07 '12 at 19:13

1 Answers1

6

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.

Stennie
  • 63,885
  • 14
  • 149
  • 175