Home >Backend Development >PHP Tutorial >Introduction to how to enable gd2 extension in php

Introduction to how to enable gd2 extension in php

WBOY
WBOYOriginal
2016-07-25 08:58:482871browse
  1. extension=php_gd2.dll
Copy the code

Find the php configuration file php.ini, search for extension=php_gd2.dll, and remove the preceding semicolon; if not, please add it directly. This situation is suitable for Windows systems and PHP that supports gd when compiled. Just restart apache after saving.

If it is compiled and installed, such as php installed by Ubuntu deb or redhat rpm, you can install this extension with the command: It looks like this:

  1. Ubuntu:sudo apt-get install php5-gd
  2. redhat:yum install php-gd
Copy the code

FreeBSD can use the systeminstall package to install gd2 to solve the problem If you are compiling and installing and do not choose to support gd, you need to install gd first, and then recompile php.

Please experience the specific details carefully during installation. After turning on the gd2 extension, you can apply the powerful image processing functions in php. Programmer's Home, I wish everyone can complete it successfully.



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