In linux-mac, if the command line executes phpa. php, an error is returned. The php extension does not seem to be loaded. How can I load it?

Source: Internet
Author: User
Tags zts
[Supplement: Code layer phpinfo (), extension information are displayed normally] PHPWarning: PHPStartup: Unabletoloaddynamiclibrary & #039; usrlocalCellarphp545.4.33libphpextensionsno-debug-non-zts-20100525mongo.so & #039; [Supplement: the code layer phpinfo () and extension information are displayed normally]

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so, 9): image not found in Unknown on line 0

Reply content:

[Supplement: the code layer phpinfo () and extension information are displayed normally]

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/mongo. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/memcache. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/redis. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/zmq. so, 9): image not found in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so, 9): image not found in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so '-dlopen (/usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/msgpack. so, 9): image not found in Unknown on line 0

The configuration file php. ini and extension_dir are incorrectly set.
/Usr/local/Cellar/php54/5.4.33/lib/php/extensions/no-debug-non-zts-20100525/the directory does not contain files such as memcache. so, in other directories

Terminalphp -i |grep mongoCheck whether your extension is successfully installed.
If you do not need to download extensions, compile, install, and install modules, you need to add modules in php. ini.

Possible 1: php. ini is not automatically loaded under the command line. You can manually specify

php  -c  /etc/php.ini a.php

Possible 2: php executed by default in the command line is inconsistent with that executed by the web. Check whether the php path in phpinfo is consistent with that in the command line, or install the extension for both versions.

Which php # view path

It is recommended to use brew for installation, saving a lot of trouble.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.