Fatal error: Call to undefined function: imagecreate() in C:\Program Files\Apache Group\Apache2\htdocs\shopbots\show_poll.php on line 77

can someone explain what i need to do please

code is below.

// set up base image
// create a blank canvas

$im = imagecreate($width,$height); - refers to this line 🙁

// Allocate colors

$white=ImageColorAllocate($im,255,255,255);

$blue=ImageColorAllocate($im,0,64,128);

$black=ImageColorAllocate($im,0,0,0);

$pink = ImageColorAllocate($im,255,78,243);

$text_color = $black;
$percent_color = $black;
$bg_color = $white;
$line_color = $black;
$bar_color = $blue;
$number_color = $pink;

// Create "canvas" to draw on
ImageFilledRectangle($im,0,0,$width,$height,$bg_color);

// Draw outline around canvas
ImageRectangle($im,0,0,$width-1,$height-1,$line_color);

// Add title
$title = 'Poll Results';
$title_dimensions = ImageTTFBBox($title_size, 0, $font, $title);
$title_length = $title_dimensions[2] - $title_dimensions[0];
$title_height = abs($title_dimensions[7] - $title_dimensions[1]);
$title_above_line = abs($title_dimensions[7]);
$title_x = ($width-$title_length)/2; // center it in x
$title_y = ($y - $title_height)/2 + $title_above_line; // center in y gap
ImageTTFText($im, $title_size, 0, $title_x, $title_y,
$text_color, $font, $title);

// Draw a base line from a little above first bar location
// to a little below last

ImageLine($im, $x, $y-5, $x, $height-15, $line_color);

    ;Windows Extensions
    ;Note that MySQL and ODBC support is now built in, so no dll is needed for it.
    ;
    ;extension=php_bz2.dll
    ;extension=php_cpdf.dll
    ;extension=php_crack.dll
    ;extension=php_curl.dll
    ;extension=php_db.dll
    ;extension=php_dba.dll
    ;extension=php_dbase.dll
    ;extension=php_dbx.dll
    ;extension=php_domxml.dll
    ;extension=php_exif.dll
    ;extension=php_fdf.dll
    ;extension=php_filepro.dll
    ;extension=php_gd2.dll
    ;extension=php_gettext.dll
    ;extension=php_hyperwave.dll
    ;extension=php_iconv.dll
    ;extension=php_ifx.dll
    ;extension=php_iisfunc.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_java.dll
    ;extension=php_ldap.dll
    ;extension=php_mbstring.dll
    ;extension=php_mcrypt.dll
    ;extension=php_mhash.dll
    ;extension=php_mime_magic.dll
    ;extension=php_ming.dll
    ;extension=php_mssql.dll
    ;extension=php_msql.dll
    ;extension=php_oci8.dll
    ;extension=php_openssl.dll
    ;extension=php_oracle.dll
    ;extension=php_pdf.dll
    ;extension=php_pgsql.dll
    ;extension=php_printer.dll
    ;extension=php_shmop.dll
    ;extension=php_snmp.dll
    ;extension=php_sockets.dll
    ;extension=php_sybase_ct.dll
    ;extension=php_w32api.dll
    ;extension=php_xmlrpc.dll
    ;extension=php_xslt.dll
    ;extension=php_yaz.dll
    ;extension=php_zip.dll

    is there anything else i can do. please.

      Originally posted by mike08

      is there anything else i can do. please.

      Yes, try uncommenting the relevant extension line:

      extension=php_gd2.dll

        Write a Reply...