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:
http://www.liquidweb.com/kb/how-to-install-the-mongodb-php-driver-extension-on-centos-6/
http://andres.jaimes.net/876/setup-mongo-php-module-centos-6/
install-mongodb-php-driver-in-centos-6-3 at madcoda com
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
Related
I have a dedicated Centos server.
As I see at plesk it has 5.3 (5.4),5.6 and 7 php but the default php is 5.4
My problem is that I want to install mongo driver for the 5.6 PHP version and I do not know where is 5.6 PHP installed.
Also I need to run some php 5.6 command line scripts.How can I find where php ver. 56 is located at centos server?
Use /opt/plesk/php/5.6/bin/ path.
You can use following instruction for installation php mongo extension for PHP5.6, for example:
Install all necessary packages for compiling mongo module:
yum install make plesk-php56-devel gcc glibc-devel openssl-devel
Compile mongo module:
/opt/plesk/php/5.6/bin/pecl install mongo
Add extension to corresponding ini file:
echo "extension=mongo.so" > /opt/plesk/php/5.6/etc/php.d/mongo.ini
Reread php handlers:
plesk bin php_handler --reread
Go to Plesk -> Tools&Settings -> PHP Settings -> 5.6.xxxx
Enjoy the view of the installed mongo module.
I have a Drupal site running on fresh MAMP PRO 3.0.3 install with the PHP version 5.3.28 on OS X Mavericks 10.9.2.
I installed memcache with pecl install memcache and added the extension=memcache.so line in php.iniunder the extensions section, but still Drupal shows multiple You must enable the PECL memcached or memcache extension to use memcache.inc. errors on top of the page.
phpinfo() on the Drupal root directory tells me that the configuration file loaded is at:
/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini
and the extension dir is:
/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/
$ cat "/Library/Application Support/appsolute/MAMP PRO/conf/php5.3.28.ini" | grep memcache
extension=memcache.so
$ ls /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/ | grep memcache
-rwxrwxr-x 1 user admin 65K Mar 28 14:00 memcache.so*
What am I doing wrong or is this problem related to MAMP PRO 3? I've installed the memcached binaries with homebrew and the process is running.
I'm also using the Individual PHP versions for every host setting in MAMP.
When starting Apache, there is an error in the logs:
PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so' - dlopen(/Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so, 9): Symbol not found: _zend_new_interned_string
Referenced from: /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so
Expected in: flat namespace
in /Applications/MAMP/bin/php/php5.3.28/lib/php/extensions/no-debug-non-zts-20090626/memcache.so in Unknown on line 0
What does this mean.
Thanks for your help!
I did not get the memcache extension provided by pecl to work at all. I even installed PHP 5.3.14 but encountered the same problem. Then I cloned the php-memcached-mamp repository from github and used the memcached extension from there and it worked ok.
Add intl extension to your configuration.
I just found this problem and another post that helped me fix it. macports installed php-config53 (not php-config) and I had a vagrant php-config from an old php 5.4 install. Removed /usr/bin/php-config and symlinked php=config53 -> php-config, re-rean pecl install memcache-beta and it worked.
I've created an Amazon Linux AMI 2013.09.02 server and installed the following:
yum install php55 php55-mbstring php55-soap php55-gd php55-mcrypt php55-pdo httpd24
Apache and PHP work fine. But I need pdo_mysql.so for a legacy version of Doctrine (1.x). I cannot find out how to get pdo_mysql.so onto this system. That file is not within the /user/lib64/php/5.5/modules/ folder.
Suggestions?
Install the package php55-mysqlnd. I believe this will provide mysql support to PDO.
Edit:
For PHP 5.6 support, the package is php56-mysqlnd.
For PHP 7.0 support, the package is php70-mysqlnd.
For PHP 7.1 support, the package is php71-mysqlnd.
I have a wamp server. I also have mongodb installed. I have installed the php_mongo extension, make changes in php.ini. I downloaded rockmongo, unzipped the file in my www folder. I edited the config file but when I try to open the GUI, it says:
"To make things right, you must install php_mongo module. Here for installation documents on PHP.net."
Need help. thanks
Hi I also had the same problem. I just solved it by following these steps.
Just install the mongodb Driver extension via sudo pecl install mongo
After installation check mongodb Driver is found or not via sudo pecl search mongo
If it is installed successfully following output will come
ubuntu#ip-***-3*-*-**:~$ sudo pecl search mongo
Retrieving data...0%
Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo 1.4.2 (stable) 1.4.2 MongoDB database driver
change php.ini located under /etc/php5/apache2
Add this line under Dynamic Extension of php.ini extension=mongo.so save the file
Now restart your server via sudo service apache2 restart
It will work
Quite old post, but for those who still find for a solution like me.
It's solved by:
- php_mongo-1.4.5-5.3-vc9.dll
- WampServer 2.2
- PHP 5.3.18
Windows 7, 64 bit.
PHP_Mongo here (https://s3.amazonaws.com/drivers.mongodb.org/php/php_mongo-1.4.5.zip)
I have installed MongoDB service in my Centos 6 cloud server. Now i need to install in my server php-pecl-mongo-1.2.10-1.el6.remi.x86_64.rpm... but it gives "packages not found". Can anyone fix this problem? My php version is PHP 5.3.3.
I am using putty for configuring Centos 6 server. I have admin privilege to configure php.ini.
You could:
try RPM installing php-pecl-mongo without a specific version
point to a specific RPM url for installation, eg. using rpmfind.net => php-pecl-mongo
install using sudo pecl install mongo per the Unix installation instructions