How do I enable GMP on Mac OS X / PHP 7?

こ雲淡風輕ζ 提交于 2019-12-11 05:35:40

问题


I'm using PHP 7 and Mac High Sierra. I'm trying to install and enable GMP. I installed via

brew install homebrew/php/php70-gmp

but when I try and enable the module through the php.ini (/usr/local/etc/php/7.0/php.ini) file, I'm failing . I tried uncommenting the line

extension=php_gmp.dll

but I get this error when running composer

Warning: PHP Startup: Unable to load dynamic library '/usr/local/Cellar/php70/7.0.27_19/lib/php/extensions/no-debug-non-zts-20151012/php_gmp.dll' - dlopen(/usr/local/Cellar/php70/7.0.27_19/lib/php/extensions/no-debug-non-zts-20151012/php_gmp.dll, 9): image not found in Unknown on line 0

How do I enable GMP in my php.ini file?


回答1:


Using some .dll file is not usual for a Mac system. Can you have a look at the folder /usr/local/Cellar/php70/7.0.27_19/lib/php/extensions/no-debug-non-zts-20151012/ to see if there is any other GMP related file? Probably, you should add the extension through

extension=gmp.so


来源:https://stackoverflow.com/questions/48527757/how-do-i-enable-gmp-on-mac-os-x-php-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!