Question

I am using Ubuntu 12.04 LTS and installed pecl in /opt/lampp/bin/ .

When installing second time its throwing error -

Command run previously -

pecl install mongo

pecl/mongo is already installed and is the same as the released version 1.5.1 install failed

Now when I am Checking by -

echo extension_loaded("mongo") ? "loaded\n" : "not loaded\n";

It is showing not Loaded.

However I updated the php.ini with extension=mongo.so and restarted the server, but its not working.

Let me now what I am doing wrong.

EDIT

I re instantiated the command and following is the outcome -

Build process completed successfully
Installing '/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/mongo.so'
install ok: channel://pecl.php.net/mongo-1.5.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini
Was it helpful?

Solution

Finally with the help of Neil Lunn I made it the right way.

I added the full path and added the code at the very last line of my php.ini

extension="/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/mongo.so"

OTHER TIPS

I got the solution for xampp in ubntu linux.

If this command not work for you pecl install mongo

you should type below command

sudo /opt/lampp/bin/pecl install mongo
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top