I am trying to integrate "pChart" with my PHP code. When I am trying to run the samples it gives me an error stating call to undefined function imagecreatetruecolor
. The suggestion solution was to load this dll "php_gd2.dll" so I have uncommented extension=php_gd2.dll
in php.ini file.
Even after that I get the same error. I have tried restarting the server & machine too.
Use the following code to test if you have GD extension:
<?php $testGD = get_extension_funcs("gd"); // Grab function list if (!$testGD){ echo "GD not even installed."; exit; } echo"<pre>".print_r($testGD,true)."</pre>";
If you get the message that it's not installed, then check the following steps:
phpinfo()
and look up php.ini pathphp.ini
: extension_dir=<path to your extensions>php.ini
: extension=php_gd2.dll //uncomment or addIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With