2

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
8
  • 1
    Did you update the right php.ini? Commented May 1, 2014 at 8:35
  • This error ? Commented May 1, 2014 at 8:41
  • @Sammaye I updated the one located in /opt/lampp/etc php.ini Commented May 1, 2014 at 8:42
  • @NeilLunn This is my php.ini pastebin.com/sYDipjaS Commented May 1, 2014 at 8:45
  • 1
    @NeilLunn I checked the logs and found [01-May-2014 10:06:32 Europe/Berlin] PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/mongo.so' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20100525/mongo.so: cannot open shared object file: No such file or directory in Unknown on line 0 Commented May 1, 2014 at 9:57

2 Answers 2

2

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"

Sign up to request clarification or add additional context in comments.

Comments

-1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.