我通过自制软件安装了php56
brew install php56
在httpd.conf
中加载到apache中LoadModule php5_module /usr/local/Cellar/php56/5.6.31_7/libexec/apache2/libphp5.so
一切似乎都很好。 但是当我添加php-intl
时brew install php56-intl
Intl,无法加载,我收到以下错误:
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'
奇怪的是,使用php-cli(/ usr / local / bin / php)时效果很好,只有在加载为apache模块时才会出现错误。
我的配置错误是什么?
答案 0 :(得分:0)
您可以先尝试➜ 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...
,如下所示:
brew search intl
然后选择要安装的正确版本'intl',例如:
-replace