0

I am new to mongodb. I just installed mongodb on our development (linux) server:

I got mongodb to work on my console and I could load and save data, but when I wanted to install the PHP driver and altered the php.ini I got this error: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/mongo.so

I searched the internet about this and all I could find was about 32bit and 64bit differences between php and the so file but as far as I know the computer that all this is installed on is only 32bit so everything on it will be 32bit as far as I know.

I installed the driver using pecl install mongo

also tried to pecl download mongo phpize it and set something to -m32 found that somewhere on the Internet, then make it and still didn't work.

Below some more info you might need in order to be able to help me out here.

uname -m i686

file /opt/lampp/bin/php-5.3.5 /opt/lampp/bin/php-5.3.5: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.0, stripped

file /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/mongo.so /opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/mongo.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

phpize --version Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525

Hope someone knows how to get this to work. I'm not quite a linux guru, know my way around a bit but please tell me exact steps to follow...

-mac-

-- also tried the bradly henk method on this page: https://www.php.net/manual/en/mongo.installation.php but that didn't work either

just upgraded from 1.4.3 to 1.4.4 using pecl upgrade mongo. This didn't solve the problem. php version installed = 5.3.5 (lampp) and mongo version installed = MongoDB shell version: 2.4.6 The 1.4.4 version of the php driver should work for PHP Version: PHP 5.2.6 or newer, but then again the 1.4.3 version should also have worked on 5.2.6 or newer

2
  • what linux are you running? I would recommend using a apckaging system like apt-get on Ubuntu/Debian
    – kratos
    Sep 25, 2013 at 15:12
  • I am using openSuse 11.4 Sep 26, 2013 at 12:15

1 Answer 1

0

/opt/lampp/lib/php/extensions/no-debug-non-zts-20090626/mongo.so

phpize --version
Configuring for: PHP Api Version: 20100412
Zend Module Api No: 20100525
Zend Extension Api No: 220100525

Note the difference in the API Number here.

You seem to have multiple installations of PHP on your system. You need to use the pecl (and phpize) tools that match the PHP version you want to load the module under.

I suspect you'll find the correct pecl binary under /opt/lampp/bin/pecl

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.