GB library is a graphics software library formanipulate images which was developed by Thomas Boutell in 1994. The current stable version in 2.1.1 released on January, 2015 written in C language. GD supports numerous programming languages including C, PHP, Perl, Python, OCaml, Tcl, Lua, Pascal, GNU Octave, REXX, Rubyand Go.
To install GD support for PHP in Ubuntu,
- Run the following command to install GD:
sudo apt-get install php5-gd
- Restart your Apache web server.
You can check to see if the GD library is enabled by creating a simple phpinfo page on your web server.
- Create a new file called
phpinfo.php - Open this file in Notepad, or your preferred WYSIWYG editor such as Dreamweaver.
- Add the following line of code:
<?php
phpinfo();
?> - Save your file within your local web server.
- Open a web browser such as Firefox or Internet Explorer.
- In the Address bar, enter the URL to this file.
Typically, on your local testing server, this will be http://localhost/phpinfo.php. - If the GD library is enabled, the resulting page should display the following section.