PHP warning

Cannot modify header information - headers already sent by (output started at /home/c/cd97155/avtor.ru/public_html/index.php:2)

/home/c/cd97155/avtor.ru/public_html/yii/framework/web/widgets/captcha/CCaptchaAction.php(263)

251         $y = round($this->height * 27 / 40);
252         for($i = 0; $i < $length; ++$i)
253         {
254             $fontSize = (int)(rand(26,32) * $scale * 0.8);
255             $angle = rand(-10,10);
256             $letter = $code[$i];
257             $box = imagettftext($image,$fontSize,$angle,$x,$y,$foreColor,$this->fontFile,$letter);
258             $x = $box[2] + $this->offset;
259         }
260 
261         imagecolordeallocate($image,$foreColor);
262 
263         header('Pragma: public');
264         header('Expires: 0');
265         header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
266         header('Content-Transfer-Encoding: binary');
267         header("Content-type: image/png");
268         imagepng($image);
269         imagedestroy($image);
270     }
271 
272 }

Stack Trace

#9
+
 /home/c/cd97155/avtor.ru/public_html/index.php(24): CApplication->run()
19 defined('YII_DEBUG') or define('YII_DEBUG',true);
20 // specify how many levels of call stack should be shown in each log message
21 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
22 
23 require_once($yii);
24 Yii::createWebApplication($config)->run();
2024-05-03 20:51:19 Apache/2.4.29 Yii Framework/1.1.10