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

2008-02-08 Thread Richard Lynch
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



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

2008-02-08 Thread Børge Holen
On Thursday 07 February 2008 17:17:30 David Giragosian wrote:
 On 2/7/08, Daniel Brown [EMAIL PROTECTED] wrote:
  On Feb 7, 2008 8:23 AM, Jochem Maas [EMAIL PROTECTED] wrote:
   Legolas wood schreef:
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*
 
   mostly likely you'll have to ask your sys admin to install/activate
   this extension ... and if you have cheaphosting then likely the answer
   will
 
  be
 
   no we don't do that - in which case find other hosting?
 
 plug shame=false /
  PilotPig has GD, ImageMagick, and all kinds of other things
  already installed, and will install any server software (when
  reasonable) upon request at no charge.  Check it out:
  http://www.pilotpig.net/
 /plug
 
 ;-P
 
  --
  /Dan

 I can attest to what Daniel is saying about PilotPig. I've had a site
 hosted there for about 5 months now and have been really happy with
 everything: costs are reasonable, lots of modules available, respectful and
 timely reponses to questions and/or concerns. Just a great overall
 experience.

 David

am I readin an comercial


-- 
---
Børge Holen
http://www.arivene.net

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



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

2008-02-08 Thread Daniel Brown
On Feb 8, 2008 2:50 PM, Børge Holen [EMAIL PROTECTED] wrote:
 am I readin an comercial

 but wait, there's more!  Order within the next 6.3 seconds
and you'll receive a cloned version of my first born, ABSOLUTELY FREE!

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

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



[PHP] problem with imagefontwidth function, It looks to be unavailable...

2008-02-07 Thread Legolas wood
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


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

2008-02-07 Thread Jochem Maas

Legolas wood schreef:

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*


that would tend to indicate that it's unavailable yes.
you don't have the [php] GD extension loaded (and probably not even installed)

php.net/gd

mostly likely you'll have to ask your sys admin to install/activate this
extension ... and if you have cheaphosting then likely the answer will be
no we don't do that - in which case find other hosting?




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



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



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

2008-02-07 Thread Daniel Brown
On Feb 7, 2008 8:23 AM, Jochem Maas [EMAIL PROTECTED] wrote:
 Legolas wood schreef:
  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*

 mostly likely you'll have to ask your sys admin to install/activate this
 extension ... and if you have cheaphosting then likely the answer will be
 no we don't do that - in which case find other hosting?

plug shame=false /
 PilotPig has GD, ImageMagick, and all kinds of other things
already installed, and will install any server software (when
reasonable) upon request at no charge.  Check it out:
http://www.pilotpig.net/
/plug

;-P

-- 
/Dan

Daniel P. Brown
Senior Unix Geek
? while(1) { $me = $mind--; sleep(86400); } ?

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



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

2008-02-07 Thread David Giragosian
On 2/7/08, Daniel Brown [EMAIL PROTECTED] wrote:

 On Feb 7, 2008 8:23 AM, Jochem Maas [EMAIL PROTECTED] wrote:
  Legolas wood schreef:
   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*
 
  mostly likely you'll have to ask your sys admin to install/activate this
  extension ... and if you have cheaphosting then likely the answer will
 be
  no we don't do that - in which case find other hosting?

plug shame=false /
 PilotPig has GD, ImageMagick, and all kinds of other things
 already installed, and will install any server software (when
 reasonable) upon request at no charge.  Check it out:
 http://www.pilotpig.net/
/plug

;-P

 --
 /Dan


I can attest to what Daniel is saying about PilotPig. I've had a site
hosted there for about 5 months now and have been really happy with
everything: costs are reasonable, lots of modules available, respectful and
timely reponses to questions and/or concerns. Just a great overall
experience.

David