php scripts

PHP Scripts and Software

PHP and the GD library

For many of our PHP components it is essential that the GD library is enabled in your PHP installation.

How to check whether GD is enabled »

How to enable GD for a Linux / UNIX PHP installation »

How to enable GD for a Windows PHP installation »

 

How to check whether GD is enabled

Checking whether GD is enabled for your PHP environment is easily achieved by running the "phpinfo" command.

To do this, copy the code from the text box and save to a file name "phpinfo.php" on your web server:-

Next access this file via your web browser. You should now see all the information about your PHP environment returned.

Scroll down the list until you come to a section titled "GD". In this section you should see the entry "GD Support" and the value will be either "enabled" or "disabled".

If GD is enabled then all well and good, if not then follow one of the following links to enable GD for your PHP installation:-

How to enable GD for a Linux / UNIX PHP installation »

How to enable GD for a Windows PHP installation »

 

«back to top

 

 

How to enable GD for a Windows PHP installation

The first thing to check is that you have the GD dll on your system

Look in the directory "./ext" where you have installed PHP. In this directory you should see a file "php_gd2.dll" ( or "php_gd.dll"). If the file is there then you have the GD module, if not then you will need to obtain this DLL ( see below » )

The next thing to do is look in your php.ini file for the line,

extension=php_gd2.dll
( or extension=php_gd.dll )

If this is commented out (ie with a semicolon in front of it) then uncomment it and save the php.ini file.

You may also need to modify the directive "extension_dir". This directive tells PHP where to find the dlls for the modules, eg,

extension_dir = "c:/php/ext/"

Stop Web Server and then restart.

That should be all there is to it. Now when you run the phpinfo command you should see the GD section in the list.

How to Obtain the php_gd2.dll

The GD dll's are provided in the latest download packages of the PHP installation for windows.

Download the zip package for Windows from the following page:-

http://www.php.net/downloads.php

Unzip the package and copy the php_gd2.dll from the ./ext/ dir to the /ext/ dir of your installation.

( In some cases it is also necessary to place a copy of all the DLL's in the ./ext/ dir in the ./system32 dir. )


Any Problems ?
Please feel free to contact us and we will endeavor to help - click here»

«back to top


How to enable GD for a Linux / UNIX PHP installation

Since PHP 4.3 the GD environment has been built into the Linux / UNIX installation. As such the easiest way to install GD is to upgrade the PHP version to at least 4.3. For the latest PHP downloads please see:-

http://www.php.net/downloads.php

However if you do not wish to upgrade your version of PHP then the GD Library can be installed itself.

The first step is download the latest tar.gz file from:-

http://www.boutell.com/gd/

Next extract the package and you should see the index.html document. Following the instructions in this document to install GD on your system.

Once the GD library has been successfully built then you will probably have to restart your server in order for PHP to pick it up.

Any Problems ?
Please feel free to contact us and we will endeavor to help - click here»

«back to top

 

Advanced Graph and Chart Collection for PHP »
.advanced graphs and charts for php

Save over 40%
7 products for the price of 4 ! more»