How to install the gd module in php: 1. Download the corresponding version of the PHP source code, then decompress and compile and install; 2. Install the gd module through the "yum -y install php-gd" command, and then restart php That’s it.
The operating environment of this article: linux5.9.8 system, PHP7.1 version, DELL G3 computer
php install gd module
Method 1: (Unsuccessful, mark first
To download libpng, jpeg, freetype, libXpm. Then
./configure --prefix=... make && make install
Download the corresponding version of the PHP source code, and then solve it Compression
In the corresponding php-src-xx.xx/ext/gd
phpize ./configure --with-xxx-dir=... .... ...
The compilation is successful, but it cannot be loaded = =Depressed.
Method 2:
yum -y install php-gd
After installation, you can check which modules are available through
php -m
and then restart php.
Recommended learning: "PHP Video Tutorial》
The above is the detailed content of What to do if the php gd module is not installed. For more information, please follow other related articles on the PHP Chinese website!