I'm new to posting on this forum. Hopefully I don't make any social mistakes here.
I have:
./configure --enable-maintainer-zts --with-pdo-mysql --with-mysqli=mysqlnd --prefix=/etc/httpd/php --with-gd --with-config-file-path=/etc/httpd/php --disable-cgi --with-zlib --with-gettext --with-gdbm --enable-zip --enable-mbstring --with-zlib-dir=/usr/include --with-libxml-dir=/usr/lib64 --with-mcrypt=/usr/lib64 --with-jpeg-dir=/usr --with-png-dir=/usr --with-apxs2=/etc/httpd/bin/apxs --enable-shared
extension_dir = "/usr/lib64/php/modules/" extension=mongo.so extension=curl.so extension=json.so extension=fileinfo.so extension=gd.so extension=mbstring.so extension=mcrypt.so extension=phar.so extension=zip.so
curl.so fileinfo.so gd.so json.so mbstring.so mcrypt.so mongo.so phar.so zip.so
<?php echo "Hello world\\n"; ?>
php version is 5.6.0
when run at the command line with:
php print_something.php
I get the following output:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/mongo.so' - /usr/lib64/php/modules/mongo.so: undefined symbol: file_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/curl.so' - /usr/lib64/php/modules/curl.so: undefined symbol: file_globals in Unknown on line 0 PHP Warning:
PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/json.so' - >/usr/lib64/php/modules/json.so: undefined symbol: executor_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/fileinfo.so' - /usr/lib64/php/modules/fileinfo.so: undefined symbol: file_globals in Unknown on l line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/gd.so' - /usr/lib64/php/modules/gd.so: undefined symbol: core_globals in Unknown on line 0
PHP Warning: PHP > Startup: Unable to load dynamic library '/usr/lib64/php/modules/mbstring.so' - /usr/lib64/php/modules/mbstring.so: undefined symbol: sapi_globals in Unknown on l line 0
PHP Warning: PHP Startup: mcrypt: Unable to initialize module Module compiled with module API=20090626 PHP compiled with module API=20131226 These options need to match in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/phar.so' - /usr/lib64/php/modules/phar.so: undefined symbol: sapi_globals in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/zip.so' - /usr/lib64/php/modules/zip.so: undefined symbol: executor_globals in Unknown on line 0
Hello world
What I really need is mongo.so (I added the others just to make sure it wasn't a mongo issue alone). I've looked both general and specific searches on php shared modules not loading, and cannot find any answers on how to resolve this. If anyone can shed light on why these modules will not load, it would be really appreciated.
The PHP extensions are not compiled for this version of your PHP.
Same for missing symbols, because not linked against the correct PHP version.
Example from your errors: mcrypt
Solution: Update the PHP extensions using your package management system to be in sync with PHP or compile them manually using PHP, the SDK and the extensions you want.
You find the Mongo Extension here: http://pecl.php.net/package/mongo
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.