RE: image validation

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

 



Sounds like you don't have the GD library loaded and/or compiled into your
version of PHP.

Use php_info() to check this.

-----Original Message-----
From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On
Behalf Of tap haran
Sent: 08 October 2008 13:30
To: php-objects@xxxxxxxxxxxxxxx
Subject: Re:  image validation

hi,giving error only in my localhost,

error is:

 Fatal error: Call to undefined function ImageCreate() in 
G:\wamp\www\components\form_image_val\working\HCIC\Cap_Img.php on line 
13









   HARAN

--- On Wed, 8/10/08, kranthi <kranthi117@xxxxxxxxx> wrote:
From: kranthi <kranthi117@xxxxxxxxx>
Subject: Re:  image validation
To: php-objects@xxxxxxxxxxxxxxx
Date: Wednesday, 8 October, 2008, 1:04 PM

you code seems to be error free

http://pear.php.net/package/Text_CAPTCHA
hope this provides a better solution to your problem..

and note that you will have to use <img
src="*full/path/of/the/phpfile*">

can u post the error statement appearing on your browser..

Kranthi.


On Wed, Oct 8, 2008 at 17:15, tap haran <tapharan@xxxxxxxxx> wrote:

>   hi,i need image validation 4 form submit,
> but,image is not creating,it give no image
>
> code
> <?php
> header("Content-type: image/png");
> $im = @imagecreatetruecolor(110, 20)
>     or die("Cannot Initialize new GD image stream");
> $background_color = imagecolorallocate($im, 0, 0, 0);
> $text_color = imagecolorallocate($im, 233, 14, 91);
> imagestring($im, 1, 5, 5,  "A Simple Text String", $text_color);
> imagepng($im);
> imagedestroy($im);
> ?>
> //----------------------------------------------------------
> or this
>
> <?php
>     session_start();
>     $md5_hash = md5(rand(0,9999));
>     $security_code = substr($md5_hash, 25, 5);
>     $enc=md5($security_code);
>     $_SESSION['count'] = $enc;
>     $secure = $_SESSION['count'];
>     //     echo "--------------------------$secure<br>";
>
>     $width = 100;
>     $height = 40;
>
>     $image = ImageCreate($width, $height);
>     $white = ImageColorAllocate($image, 255, 255, 255);
>     $black = ImageColorAllocate($image, 0, 100, 0);
>     $grey = ImageColorAllocate($image, 204, 204, 204);
>
>     ImageFill($image, 0, 0, $grey);
>     //Add randomly generated string in white to the image
>     ImageString($image, 10, 30, 10, $security_code, $black);
>     ImageRectangle($image,0,16,$width-1,$height-1,$grey);
>     imageline($image, 0, $height/2, $width, $height/2, $grey);
>     imageline($image, $width/2, 0, $width/2, $height, $grey);
>
>     header("Content-Type: image/jpeg");
>     ImageJpeg($image);
>     ImageDestroy($image);
>     ImageDestroy($image);
>     ?>
>
> Get your preferred Email name!
> Now you can @ymail.com and @rocketmail.com.
> http://mail.promotions.yahoo.com/newdomains/aa/
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]


------------------------------------

Are you looking for a PHP job? Join the PHP Professionals directory Now!
http://www.phpclasses.org/professionals/Yahoo! Groups Links






      New Email addresses available on Yahoo!
Get the Email name you&#39;ve always wanted on the new @ymail and
@rocketmail. 
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

[Non-text portions of this message have been removed]


------------------------------------

Are you looking for a PHP job? Join the PHP Professionals directory Now!
http://www.phpclasses.org/professionals/Yahoo! Groups Links




***********************************************************************************
Any opinions expressed in email are those of the individual and not necessarily those of the company. This email and any files transmitted with it are confidential and solely for the use of the intended recipient 
or entity to whom they are addressed. It may contain material protected by attorney-client privilege. If you are not the intended recipient, or a person responsible for delivering to the intended recipient, be advised that you have received this email in error and that any use is strictly prohibited.

Random House Group + 44 (0) 20 7840 8400
http://www.randomhouse.co.uk
http://www.booksattransworld.co.uk 
http://www.kidsatrandomhouse.co.uk
Generic email address - enquiries@xxxxxxxxxxxxxxxxx

Name & Registered Office:
THE RANDOM HOUSE GROUP LIMITED
20 VAUXHALL BRIDGE ROAD
LONDON
SW1V 2SA
Random House Group Ltd is registered in the United Kingdom with company No. 00954009, VAT number 102838980
***********************************************************************************


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux