General source installation of the addition of the GD library is not supported in JPEG format pictures, only support the following format
GD Support |
Enabled |
GD Version |
Bundled (2.0.34 compatible) |
GIF Read Support |
Enabled |
GIF Create Support |
Enabled |
PNG Support |
Enabled |
LibPNG Version |
1.2.49 |
WBMP Support |
Enabled |
XBM Support |
Enabled |
Let's add support for JPEG format files
wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz
TAR-ZXVF jpegsrc.v8b.tar.gz
CD jpeg-8b
./configure--prefix=/usr/local/jpeg--enable-shared--enable-static
Make && make install
Below to enter the PHP source directory under the ext of the GD directory
After entering the GD directory, note that the following/usr/local/php/is the installation path of your server PHP. Mine is the way it's written.
/usr/local/php/bin/phpize
./configure--with-php-config=/usr/local/php/bin/php-config--with-jpeg-dir=/usr/local/jpeg/
Make && make install
After executing these systems, you will be prompted to gd.so the build directory
After adding gd.so under PHP.ini, restart the PHP restart Application server and it will be OK.
Some machines may not work, so solve
Yum Install Libjpeg-devel freetype-devel libpng-devel
Make clean and then re-/configure
Make&make Install
See Phpinfo OK.
GD Support ENABLEDGD version 2.0GIF Read the enabledgif Create support Enabledjpeg support Enabledlibjpeg Version unkn Ownpng Support Enabledlibpng Version 1.2.10WBMP support enabled
GD Support |
Enabled |
GD Version |
Bundled (2.0.34 compatible) |
GIF Read Support |
Enabled |
GIF Create Support |
Enabled |
JPEG Support |
Enabled |
Libjpeg Version |
8 |
PNG Support |
Enabled |
LibPNG Version |
1.2.49 |
WBMP Support |
Enabled |
XBM Support |
Enabled |
Directive Local Value Master value
Gd.jpeg_ignore_warning |
0 |
0 |