admin/environment/php extension/gd: Difference between revisions

From MoodleDocs
m (added link to spanish translation of page)
(copying from 4.0 docs)
Line 1: Line 1:
{{Environment}}
{{Environment}}
== GD module for php5 ==
== GD extenion for PHP ==


This package provides a module for handling graphics directly from PHP scripts. It supports the PNG, JPEG, XPM formats as well as Freetype/ttf fonts.
This extension provides functionality for handling graphics directly from PHP scripts. It supports the PNG, JPEG, XPM formats as well as FreeType/ttf fonts.


== Install GD module for php 5 ==
== Installing ==
Package names below may vary if using third party package repositories or the PHP version is different from the operating system's default.


'''Ubuntu:'''
=== Ubuntu ===
Download and install gd
Download and install gd:


  sudo apt-get install php5-gd
  sudo apt-get install php-gd


You might need to restart Apache (not necessary)
You might need to restart Apache (not necessary):


  sudo /etc/init.d/apache2 restart
  sudo /etc/init.d/apache2 restart


'''Centos:'''
=== CentOS ===
Download and install gd
Download and install gd:


  yum install php-gd
  dnf install php-gd


You might need to restart Apache (not necessary)
You might need to restart PHP-FPM to apply the change in configuration:


  sudo /etc/init.d/apache2 restart
  systemctl restart php-fpm
 
If you are unable to find the correct package try searching with:
 
dnf search 'php*-gd'


[[Category:Environment|PHP]]
[[Category:Environment|PHP]]


[[es:admin/environment/php extension/gd]]
[[es:admin/environment/php extension/gd]]

Revision as of 13:58, 30 November 2022

GD extenion for PHP

This extension provides functionality for handling graphics directly from PHP scripts. It supports the PNG, JPEG, XPM formats as well as FreeType/ttf fonts.

Installing

Package names below may vary if using third party package repositories or the PHP version is different from the operating system's default.

Ubuntu

Download and install gd:

sudo apt-get install php-gd

You might need to restart Apache (not necessary):

sudo /etc/init.d/apache2 restart

CentOS

Download and install gd:

dnf install php-gd

You might need to restart PHP-FPM to apply the change in configuration:

systemctl restart php-fpm

If you are unable to find the correct package try searching with:

dnf search 'php*-gd'