After searching on google and SO, I couldn’t find a practical tutorial for setting up mongo db with ZendServer. So here it is:
My system : Linux {name} 2.6.32-31-generic #61-Ubuntu SMP Fri Apr 8 18:25:51 UTC 2011 x86_64 GNU/Linux
- Follow the directions found here: http://www.mongodb.org/display/DOCS/PHP+Language+Center
- Tip: if you get an error message that says something about phpize, do
sudo apt-get install php5-dev
- Tip: if you get an error message that says something about phpize, do
- Because ZendServer uses a separate instance of PHP, your not done yet. You must now add the line
extension=mongo.so
to the ZendServer’s php.ini. Check your phpinfo if you are not sure where it is located, on mine it was located at /usr/local/zend/etc/php.ini - Now you must copy the so file to Zend Server’s extension directory. I guess you could do a symlink, but I just copied mine:
sudo cp /usr/lib/php5/20090626+lfs/mongo.so /usr/local/zend/lib/php_extensions/mongo.so sudo /etc/init.d/apache2 restart
Simple, huh?
