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

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

 



You probably do not have GD installed...

Does <?php phpinfo();?> list "GD" as one of your extensions?

If not, install it.

On Thu, February 7, 2008 6:57 am, Legolas wood wrote:
> 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
>


-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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