What should I do if the php gd library does not support jpg?

藏色散人
Release: 2023-03-09 14:42:02
Original
2225 people have browsed it

php gd library is not supported because the jpeg library path was not declared before compiling the gd library and during configuration. The solution is: first declare the jpeg library path; then re-"make&make install"; finally restart php-fpm. Can.

What should I do if the php gd library does not support jpg?

The operating environment of this article: windows7 system, PHP5 version, DELL G3 computer

php gd library does not support jpeg solution

I won’t go into details here about how I encountered this problem. If you have indeed installed the gd library, but find that it cannot support images in jpeg format, you can find the answer below.

The reason is that before compiling the gd library, the jpeg library path was not declared during configuration.

The solution is as follows:

32-bit system:

./configure –with-php-config=/usr/local/php5/bin/php-config –with-jpeg-dir=/usr/lib
Copy after login

64-bit system

./configure –with-php-config=/usr/local/php5/bin/php-config –with-jpeg-dir=/usr/lib64
Copy after login

Recommended learning: "PHP Video Tutorial

After re-make&make install, restart php-fpm.

The above is the detailed content of What should I do if the php gd library does not support jpg?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!