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)
Related
After following the install instructions for oracle instant client, php is not able to load the oci8 extension.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
I am getting an error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0
I have verified both oci8.so and libmql1.so locations.
Am I missing something?
I'm using Ubuntu 16.04 and php version 7.1
There are few directories in /usr/lib/php/
for example
20131226 for php5.6
20160303 for php7.1
so problem with me that, the oci8 extension got installed on the wrong ( a user lib folder for php7.2) so I had to remove the php 7.2 completly
sudo apt-get purge php7.2-common
then I had uninstall the oci8 by running following command
sudo pecl uninstall oci8
and install again by running the following command
sudo pecl install oci8
To check the configuration loaded you do
php-config --extension-dir
And make sure that all extension are installed in the correct extension directory.
Make changes in the /etc/php/7.1/apache2/php.ini and /etc/php/7.1/cli/php.ini
Check by running phpinfo(); You must see this, ignore the cli if that stills gives you same error as your web shows the extension is getting loaded.
I solved adding the following to /etc/environment:
LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
I followed this tutorial: https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703
What I did was completely remove any installations of PHP and reinstall the version that I need.
sudo apt-get purge 'php*'
Source: https://askubuntu.com/a/59889/226518
Or:
export LD_LIBRARY_PATH=/usr/local/instantclient_12_1/
I had the same problem, it works for me.
After wasting entire day for this small problem finally I came with this solution.
Sorry guys I am not champion is PHP but somehow I manage.
In my system I have CentOS 7 and PHP 7.4.XX.
I changed my LD_LIBRARY_PATH,
I have restarted my httpd service and checked phpinfo in browser (http://localhost/info.php),
Last I restared php-fpm service ........... and it's work for me.
Thanking you,
Anand
After following the install instructions for oracle instant client, php is not able to load the oci8 extension.
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html#ic_x64_inst
I am getting an error.
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/oci8.so' - libmql1.so: cannot open shared object file: No such file or directory in Unknown on line 0
I have verified both oci8.so and libmql1.so locations.
Am I missing something?
I'm using Ubuntu 16.04 and php version 7.1
There are few directories in /usr/lib/php/
for example
20131226 for php5.6
20160303 for php7.1
so problem with me that, the oci8 extension got installed on the wrong ( a user lib folder for php7.2) so I had to remove the php 7.2 completly
sudo apt-get purge php7.2-common
then I had uninstall the oci8 by running following command
sudo pecl uninstall oci8
and install again by running the following command
sudo pecl install oci8
To check the configuration loaded you do
php-config --extension-dir
And make sure that all extension are installed in the correct extension directory.
Make changes in the /etc/php/7.1/apache2/php.ini and /etc/php/7.1/cli/php.ini
Check by running phpinfo(); You must see this, ignore the cli if that stills gives you same error as your web shows the extension is getting loaded.
I solved adding the following to /etc/environment:
LD_LIBRARY_PATH=/opt/oracle/instantclient_12_2:$LD_LIBRARY_PATH
I followed this tutorial: https://gist.github.com/hewerthomn/81eea2935051eb2500941a9309bca703
What I did was completely remove any installations of PHP and reinstall the version that I need.
sudo apt-get purge 'php*'
Source: https://askubuntu.com/a/59889/226518
Or:
export LD_LIBRARY_PATH=/usr/local/instantclient_12_1/
I had the same problem, it works for me.
After wasting entire day for this small problem finally I came with this solution.
Sorry guys I am not champion is PHP but somehow I manage.
In my system I have CentOS 7 and PHP 7.4.XX.
I changed my LD_LIBRARY_PATH,
I have restarted my httpd service and checked phpinfo in browser (http://localhost/info.php),
Last I restared php-fpm service ........... and it's work for me.
Thanking you,
Anand
I am trying to install MongoDB on my computer running Mac OS X 10.11 (El Capitan).
My Apache + PHP configuration was already working correctly.
I installed MongoDB and PHP drivers for MongoDB through MacPorts:
sudo port install mongodb
sudo port install php55-mongodb
Installation ran correctly.
I added mongodb.so file to the extensions loaded in the php.ini file:
extension=/opt/local/lib/php55/extensions/no-debug-non-zts-20121212/mongodb.so
When I run phpinfo() function in php file, mongodb extension seems to be loaded correctly:
I tried to test my connexion by initializing a MongoClient instance:
<?php
$mongoDB = new MongoClient();
var_dump($mongoDB);
?>
Unfortunately, I got a HTTP ERROR 500, and I got the following line in my Apache logs:
PHP Fatal error: Class 'MongoClient' not found in ...
Did I make something wrong ?
On most of site I saw you need to add the extension mongo.so and not mongodb.so in your php.ini.
If it's not solved your problem, I recommand you to install MongoDB Drive with PELC.
Run command line:
$ sudo pecl install mongo
And add this line to your php.ini:
extension=mongo.so
Doc php.net Mongo Installation
Finally found a solution to my problem.
As #neverpanic and #Zagonine made me understand, php-mongodb and php-mongo are not the same extension.
If you want to use old PHP driving classes, you should use php-mongo package instead of the very new php-mongodb.
Trying to install latest php-mongo extension, I had an other problem related to OpenSSL. To bypass it, I installed an old version of php-mongo extension:
sudo /usr/local/pear/bin/pecl install mongo-1.5.8
Hopefully it will help someone else.
I'm trying to install mongodb in a PHP environment. MongoDB itself is installed fine, I've run pecl install mongo, and added extension=mongo.so to php.ini; but my Laravel application complains that it can't find the class MongoClient. Checking phpinfo() reveals no mention of Mongo, suggesting that it isn't aware of the driver.
I noticed that all the instructions for installing mongo on Ubuntu mention apt-get install php5-dev. Is that a requirement for the mongodb php driver? At the moment the server is built with Chef and installs php with apache2::mod_php5. If php5-dev is required, can it be installed as an apache module?
Yeah you should as stated by docs here http://docs.mongodb.org/ecosystem/drivers/php/
Also if its unable to find mongo drivers ,Try debugging , check logs if it says something like mongo.so file is missing.
Don't forget to restart php and apache after saving php.ini
i am installing Moodle 2.1 with postgre database. the problem i am facing is that it gives me error
PHP has not been properly configured with the PGSQL extension so that
it can communicate with PostgreSQL. Please check your php.ini file or
recompile PHP.
i have adjusted all the required extension for pgsql. but still i get the same error. i have even created a database in postgre (an empty database) but still i didnt work.
please help me
thanks
Have you tried (command line):
apt-get install php5-pgsql
apache2ctl restart
Or:
sudo apt-get install php5-pgsql
sudo apache2ctl restart
I had a lot of trouble, because the version of Moodle I have (3.3) wants a newer version of php than I have on my Ubuntu 14.04. I had 5.5.9 and Moodle insisted on 5.6. So I upgraded php5 to php5.6 with a special ppa. But what happened was it put the new php5.6 next to the old one. So I kept having trouble with Apache, until I set soft links to libphp5.so from my new libphp5.6.so, and set the conf and load files in mods-available to the new php5.6 versions.
Then I had a problem with the postgresql php driver. I tried installing php5-pgsql and it was always linking back to the old php 5.5.9 on Ubuntu! This did not make moodle happy. Then I discovered that there is a php5.6-pgsql. I uninstalled my php5-pgsql and installed php5.6-pgsql. Uff. And added these two lines to php.ini (inside the /etc/php5/apache2 directory):
extension=/usr/lib/php/20131226/pdo_pgsql.so
extension=/usr/lib/php/20131226/pgsql.so
Now moodle can move on to the next error (the php xml extension)!
sudo apt-get install php5-pgsql fixed it for me despite the fact that my vhost on Plesk runs PHP7.0. Now I can use the CLI in Moodle with PostgreSQL.