安装/配置
在线手册:中文  英文

安装

In order to have these functions available, you must compile PHP with GMP support by using the --with-gmp option.


安装/配置
在线手册:中文  英文

用户评论:

omagaldadze at yahoo dot com (2013-05-04 09:41:44)

On ArchLinux php 5.4.14-1 I had to uncomment the line
extension=gmp.so
in /etc/php/php.ini file.
Probably, restart of web server (e.g. Apache) is required if working from web.

mike dot mackintosh at angrystatic dot com (2013-04-01 15:07:31)

On Debian platforms, make sure you install the gmp development library first:
sudo apt-get install libgmp-dev
Just like other extensions, you need the libs installed before php compile will gracefully complete.

Jens-Erik (2012-08-02 11:48:04)

On MacPorts look for the PHP-GMP package:
port list php*gmp*
and install it: e. g.
sudo port -v install php54-gmp

admin at ee-dd dot com (2011-10-03 21:18:32)

on ubuntu you can get it from Synaptic Package Manager
just search words "gmp",you'll find it.

MiquelFire (2009-08-24 12:40:46)

With PHP 5.3 on Windows, you need to use the VC9 build, otherwise you will not have the dll to enable GMP

Chris (2009-03-02 11:49:39)

Under Windows you will need to uncomment the line
;extension=php_gmp.dll
within the php.ini and restart Apache.

arancaytar dot ilyaran at gmail dot com (2008-12-30 23:48:00)

Note that this parameter requires a path, as in --with-gmp=DIR, if gmp is installed in a non-standard location, which is almost always the case when you are building your own PHP installation in your home directory.
Obvious, but it's an easy mistake.

易百教程