Contents Previous Next

3.5 Detailed steps to install JpGraph

  1. If You are insatlling the 1.x branch then make sure the PHP version used is at least 4.3.x (preferable 4.3.10 or higher) and that the PHP version have compiled support for GD library. It is absolutely critical that GD is fully working. Please see the earlier sections on how to make sure. JpGraph supports both GD 1.x and GD 2.x However it is strongly recommended to use GD 2.x since that will improve performance and support true color images as well as alphablending.

    If You are insatlling the 2.x branch then make sure the PHP version used is at least 5.0.1 (preferable 5.0.5 or higher) and that the PHP version have compiled support for GD 2.x library. Please note that the 2.x branch will not work with PHP 4.x

  2. Unzip and copy the files to a directory of your choice.
  3. Set up the directory paths in jpg-config.inc.php where the cache directory should be and where your TTF directory is. Note that Apache/PHP must have write permission in your cache directory.
  4. Check that all rest of the DEFINE in the top of JpGraph.php is setup to your preference. The default should be fine for most users. (See also Note 5. below) Specifically check that the settings of USE_GD2_LIBRARY reflects your installation, (should be true if you have GD2 installed, false otherwise).
  5. Make sure PHP have write privileges to your cache directory if you plan on using the cache feature.
  6. Some windows installations seems to have a problem with a PHP script ending in a newline (This newline seems to be sent to the browser and will cause a Header already sent error). If you have this problem try remove all trailing newlines in the jpgraph* files
  7. Read (really!) the JpGraph FAQ.


Contents Previous Next