RockMongo, "Unable to load dynamic library '/.../mongo.so' - wrong ELF class: ELFCLASS64 in Unknown"
I just installed RockMongo by extracting all the files to a lampp web folder /opt/lampp/htdocs/rockMongo/
. Visiting index.php shows
To make things right, you must install php_mongo module. Here for installation documents on PHP.net.
I followed the instructions there (I had to install php-pear
):
- sudo pecl install mongo
- Add the following line to php.ini: extension=mongo.so
Now, when I start the web server (apache), I get the following warning, repeated hundreds of times:
Warning: PHP Startup: It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/New_York' for 'EDT/-4.0/DST' instead in Unknown on line 0
and also this warning a single time:
Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/mongo.so' - /usr/lib/php5/20090626/mongo.so: wrong开发者_StackOverflow社区 ELF class: ELFCLASS64 in Unknown on line 0
The index page stills shows the same message (which means that class_exists("Mongo")
returns false)
I tried putting in the absolute path to mongo.so, but that didn't do anything. What's going on?
edit: I used
$ file /usr/bin/php5
/usr/bin/php5: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped
which seems to suggest my php installation is 64 bits, yet when I print out PHP_INT_MAX
I get 2147483647
which seems to indicate my installation is 32 bits. How can I know the "bitness" of my php installation?
From the second PHP warning, it looks like you've mixed 32bit code and a 64bit library.
Make sure all the stuff you've downloaded is of the same "bitness" as your PHP installation.
精彩评论