problem with imagefontwidth function, It looks to be unavailable...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
Thank you for reading my post
I am trying to run a php based application using php5 and apache.
but I receive an error like:


*Fatal error*:  Call to undefined function imagefontwidth() in */var/www/v603/includes/functions.php* on line *28*


when line 28 and its surrounding lines are:

## create an image not a text for the pin

    $font  = 6;

    $width = imagefontwidth($font) * strlen($generated_pin);

    $height = ImageFontHeight($font);

 

    $im = @imagecreate ($width,$height);

    $background_color = imagecolorallocate ($im, 219, 239, 249); //cell background

    $text_color = imagecolorallocate ($im, 0, 0,0);//text color

    imagestring ($im, $font, 0, 0,  $generated_pin, $text_color);

    touch($image_url . 'uplimg/site_pin_' . $full_pin . '.jpg');

    imagejpeg($im, $image_url . 'uplimg/site_pin_' . $full_pin . '.jpg');

 

    $image_output = '<img src="' . $image_url . 'uplimg/site_pin_' . $full_pin . '.jpg">';

 

    imagedestroy($im);

 

    return $image_output;



Can you tell me what is wrong with this code and how I can resolve the
problem.

Thanks

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux