How to add mongo support to PHP 5 in CentOS ?
If you have SSH access and root you should be able to follow the “Installing on *NIX” instructions (the RPMs are just created for convenience sake.)
You can try using pecl … PECL is a repository for PHP Extensions and the mongo php driver uses that system.
Here is a blog post you might find helpful …
Install instructions from that post …
Command Line Install for Linux
Via your command line run pecl … (if you use sudo):
$ sudo pecl install mongo
If you are already root …
# pecl install mongo
If you get an error saying the system can’t find phpize then you may need to install the PHP dev package (this is how you do if your OS has aptitude, you might need to use some other method to install the PHP dev packaes) …
$ sudo aptitude install php5-dev
You will then need to edit your php.ini file add add the mongo.so extension:
Restart your webserver and you are done.