Unable to enable ext-gmp

这一生的挚爱 提交于 2019-12-11 16:18:58

问题


So I've been trying to enable gmp on my macbook pro, but upto no avail.

Here's what I've done till now.

  1. Uncommented extension=php_gmp.dll in /private/etc/php.ini
  2. Uncommented extension=php_gmp.dll in /usr/local/php5/lib/php.ini (coonfiguration file as displayed in phpinfo() )
  3. phpinfo() says gmp is enabled, but when I do php -m, it doesnt shows gmp.

What must I do?


回答1:


The lines that you're uncommenting are examples. The extension is not actually present on your system -- you need to install the extension before you can enable it.

The easiest way of doing this will probably be to install the extension through Homebrew. If you have Homebrew installed, you can install the extension by running brew install php72-gmp.




回答2:


If I get you right in your third point, you arr probably only editing the php.ini for web server usage and not the one to be used for CLI? You can find that second ini file through php -i | grep ini



来源:https://stackoverflow.com/questions/47950495/unable-to-enable-ext-gmp

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