Home>Article>Backend Development> What should I do if php jpeg does not support it?

What should I do if php jpeg does not support it?

藏色散人
藏色散人 Original
2020-09-07 09:56:32 1806browse

The solution to the problem that php jpeg is not supported: First, before compiling the gd library, configure and declare the jpeg library path; then re-execute "make&make install"; and finally restart "php-fpm".

What should I do if php jpeg does not support it?

Recommended: "PHP Video Tutorial"

Solution to the problem that the gd library does not support jpeg

I won’t go into details here about how to encounter 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

64-bit system

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

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

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

Statement:
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