Call to undefined function: imagecreate()

images php coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
New php-forum User
New php-forum User
Posts: 6
Joined: Sun Dec 08, 2002 11:12 pm
Location: india

Fri Apr 18, 2003 11:24 pm


I am working on a script of image creation by using the function of php.

In that script i just write down the following code.

$myImage = imagecreate(300, 300);
$black = imagecolorallocate($myImage, 0, 0, 0);
$white = imagecolorallocate($myImage, 255, 255, 255);
imagefilledrectangle($myImage, 25, 25, 275, 275, $white)

But when i run this script it display the following error message.

<br />
<b>Fatal error</b>: Call to undefined function: imagecreate() in <b>/home/dinsol/public_html/vikas/test.php</b> on line <b>3</b><br />

Suggestion from any one would be appreciated.



New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

Sat Apr 19, 2003 2:45 am

do you have GD libraries compiled in your PHP build?

it'll tell you in phpinfo();

if you use one of the dinsol ones with the php build as specified, the GD is NOT compiled - maybe pester the host to go and get it from
avatar image based upon nasas apod (only updates if I post though)

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest