How to install gd library in php-cli environment?

WBOY
Release: 2023-03-01 15:10:01
Original
1534 people have browsed it

There are a lot of pictures to process now, but I found that when writing gd functions in cli mode, an error is reported, that is, the gd-related functions are all undefined.

How to install the gd library or modify the configuration in this case?

PS: The gd library can be used in cgi mode.

Reply content:

There are a lot of pictures to process now, but I found that when writing gd functions in cli mode, an error is reported, that is, the gd-related functions are all undefined.

How to install the gd library or modify the configuration in this case?

PS: The gd library can be used in cgi mode.

Executephp --iniSee if the configuration used by php-cli is the same as php-cgi. Using the same one should ensure that php-cli can also load the PECL module of php-cgi. Or find gd directly Module, load it explicitly in the configuration:
extension=php_gd.so

phpize

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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template