darkfreaks Posted September 2, 2007 Author Share Posted September 2, 2007 if i put the header back in jesi i get Cannot modify header information - headers already sent by (output started at /home/lilysgra/public_html/lilysgraveyard/index.php:27) ^OBV it goes away when i take it out. Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 2, 2007 Share Posted September 2, 2007 Well that seems like a more important problem. You NEED the header line. Go read the header errors topic. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 2, 2007 Author Share Posted September 2, 2007 i tried using session start ob_start and i just get even more errors. *shrug* Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 2, 2007 Share Posted September 2, 2007 Did you look at what is on line 27? We talked about this before... Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 2, 2007 Author Share Posted September 2, 2007 Bleh i got a better captcha it had tons of errors in it. but it works but it wont read the .tff monofont file? the error code in php is <?php var $font = 'monofont.ttf'; /* create textbox and add text */ $textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function'); $x = ($width - $textbox[4])/2; $y = ($height - $textbox[5])/2; imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->font , $code) or die('Error in imagettftext function'); /* output captcha image to browser */ header('Content-Type: image/jpeg'); imagejpeg($image); imagedestroy($image); $_SESSION['security_code'] = $code; } } $width = isset($_GET['width']) && $_GET['height'] < 600 ? $_GET['width'] : '120'; $height = isset($_GET['height']) && $_GET['height'] < 200 ? $_GET['height'] : '40'; $characters = isset($_GET['characters']) && $_GET['characters'] > 2 ? $_GET['characters'] : '6'; $captcha = new CaptchaSecurityImages($width,$height,$characters); ?> Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 2, 2007 Share Posted September 2, 2007 Why are you using $this->font when the font is defined as $font? Don't Copy and Paste without reading and understanding! Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 2, 2007 Author Share Posted September 2, 2007 <?php $textbox = imagettfbbox($font_size, 0, $this->font, $code) or die('Error in imagettfbbox function'); ?> this is the exact error i get 'Error in imagettfbbox function' Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 2, 2007 Share Posted September 2, 2007 Do you read what I write anymore or just post whatever you feel like saying? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted September 2, 2007 Author Share Posted September 2, 2007 i obviously do? i obviously changed it? why would i keep asking otherwise? if it was not the solution. Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 2, 2007 Share Posted September 2, 2007 You didn't change anything according to your post! You're still using $this->font when there is no $this->font, it's just $font! Are you even in a class function? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.