Support for adding jpeg files to the GD library of liunxphp
General source code installation and addition of the GD library does not support jpeg images, only supports the following formats
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 |
Next we will add support for jpeg files.
Wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz
Tar-zxvf restart src.v8b.tar.gz
Cd jpeg-8b
./Configure -- prefix =/usr/local/jpeg -- enable-shared -- enable-static
Make & make install
Go to the gd directory under ext under the php source code directory.
Go to the gd directory and run the following command:/usr/local/php/is the php installation path on your server. This is my path.
/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 these systems are executed, you will be prompted to generate the directory gd. so.
Add gd. so under php. ini, restart php, restart the application server, and then OK.
Some machines may not work yet.
Yum install libjpeg-devel freetype-devel libpng-devel
Make clean and try again./configure
Make & make install
Check phpinfo. OK.
GD Support enabledGD Version 2.0GIF Read Support enabledGIF Create Support enabledJPEG Support enabledlibJPEG Version unknownPNG 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 |