Ya it says gd is installed but why my image verification not working, code is correct coz past it use to work w/o any problem. I checked in another server too and it works w/o problem.
i found this error when i tried to open the captcha image by its link. Plz tell me what is wrong here...
---
Warning: fclose() [function.fclose]: 2 is not a valid stream resource in /home/edited/public_html/contact/contact.php on line 83
Warning: fclose() [function.fclose]: 2 is not a valid stream resource in /home/edited/public_html/contact/contact.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/edited/public_html/contact/contact.php:83) in /home/edited/public_html/contact/contact.php on line 89
-------
But same code works in my other server w/o any error
73 $Handle = opendir('code');
74
75 while ( $CaptchaFile = readdir($Handle) ) {
76 if ( substr($CaptchaFile, 0, 1) != '.' ) {
77 if ( ( filemtime('code' . '/' . $CaptchaFile) + 900 * 60 ) < time() ) {
78 unlink('code' . '/' . $CaptchaFile);
79 }
80 }
81 }
82
83 fclose($Handle);
84
85 $handle = fopen('code' . '/' . $FileName, 'w');
86 fclose($Handle);
87
88 if (imagetypes() & IMG_JPG) {
89 header("Content-type: image/jpeg");
90 imagejpeg($im);
91 } elseif (imagetypes() & IMG_PNG) {
92 header("Content-type: image/png");
93 imagepng($im);
94 }
95 exit;