I have a cloud hosted VPS with Centos 6.6 + Direct Admin + PHP 5.6.6 installed by my hosting provider.
I need to have the MongoDB php driver installed to connect to an external mongoDB.
I tried the following installations:
Also yum --enablerepo=remi,remi-php56 php-pecl-mongo
does not do the trick
I have in /usr/lib64/php/modules/
the following modules: bz2.so
, calendar.so
, ctype.so
, curl.so
, exif.so
, fileinfo.so
, ftp.so
, gettext.so
, iconv.so
, json.so
, mongo.so
, phar.so
, sockets.so
, tokenizer.so
, zip.so
And in /etx/php.d/
the .ini files that are created for each module.
Installing mongo php driver on an old vps with centos 5.x was not a problem also not on Centos 6.2 with php 5.5. In these cases the mongo.so was located in the location /usr/local/php/lib/php/extensions/no-debug-non-zts-xxxxxx/
and had to add it manually to the php.ini
The hosting provider is not supporting any else than the default installation I got.
I really appreciate any help.
Stan
I found the solution in the comment of this answer https://serverfault.com/questions/589877/pecl-command-produces-long-list-of-errors PEAR had to be reinstalled from the remi-php56 repo because of PHP 5.6 running on the server. After that I could use pecl install mongo
and copy the mongo.so to the /usr/local/php/lib/php/extensions/no-debug-non-zts-xxxxxx/
folder.
# php -m | grep -i mongo
> mongo
is running