简体   繁体   中英

Php homebrew “Symbol not found: _compiler_globals” while loading php intl extension as apache module

I installed php56 via homebrew

brew install php56

Loaded it into apache in httpd.conf

LoadModule php5_module    /usr/local/Cellar/php56/5.6.31_7/libexec/apache2/libphp5.so

And everything seems fine. But when I added php-intl

brew install php56-intl

Intl, doesn't load, and I get the following error:

PHP Core Warning 'yii\base\ErrorException' with message 'PHP Startup: 
Unable to load dynamic library '/usr/local/opt/php56-intl/intl.so' - dlopen(/usr/local/opt/php56-intl/intl.so, 9): 
Symbol not found: _compiler_globals
Referenced from: /usr/local/opt/php56-intl/intl.so
Expected in: flat namespace in /usr/local/opt/php56-intl/intl.so' 

What is strange, it works fine when using php-cli(/usr/local/bin/php), error only appears when loading as apache module.

What is my misconfiguration?

You can try brew search intl first like below:

➜ brew search intl
==> Searching local taps...
homebrew/php/php53-intl                 homebrew/php/php55-intl                 homebrew/php/php70-intl                 intltool
homebrew/php/php54-intl                 homebrew/php/php56-intl                 homebrew/php/php71-intl
==> Searching taps on GitHub...
==> Searching blacklisted, migrated and deleted formulae...

Then select the right version 'intl' to install, for example:

brew search intl

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM