Call to undefined function imagecreatetruecolor()
This is probably the first error message that you can see while using pChart. Many PHP installations are made
without adding GD support. If GD isn't linked in your PHP setup you'll have this error message :
C:\Web\pChart>php -q Example1.php
PHP Fatal error: Call to undefined function imagecreatetruecolor() in C:\pChart.class on line 134
To activate GD support on windows systems edit your
php.ini file (located in your php installation)
and uncomment this line :
;extension=php_gd2.dll
..by removing the
; character. If you are running a linux installation of PHP, you must recompile it
including GD support, you'll also need to include the FreeType support. We invite you to read the PHP manual.
How to check your PHP setup
To see the configuration of PHP on your web server, make a file named
test.php in the web directory root
and write the following in it :
<?php
phpinfo();
?>
..then open this page in a web browser and locate the GD part :
GD Support | enabled |
GD Version | bundled (2.0.34 compatible) |
FreeType Support | enabled |
FreeType Linkage | with freetype |
FreeType Version | 2.1.9 |
pChart needs that both GD and FreeType support are enabled.
|
|
Last updated on 08/12/2008 |