Deprecated: Optional parameter $settings declared before required parameter $v is implicitly treated as a required parameter in /home/site/wwwroot/protected/extensions/Captcha/YiiCaptcha.php on line 39
PHP warning

PHP warning

Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/protected/extensions/Captcha/YiiCaptcha.php:39)

/home/site/wwwroot/protected/extensions/Captcha/YiiCaptcha.php(75)

63         putenv('GDFONTPATH=' . realpath('.'));
64         $textbox = imagettfbbox($font_size, 0, $this->settings['font'], $code) or die('Error in imagettfbbox function');
65         $x = ($width - $textbox[4])/2;
66         $y = ($height - $textbox[5])/2;
67         $y -= 5;
68         $x = (int)$x;
69         $y = (int)$y;
70         imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->settings['font'] , $code) or die('Error in imagettftext function');
71         Yii::app()->session['security_code']=$code;
72         //$this->Controller->Session->write('security_code',$code);
73         @ob_end_clean(); //clean buffers, as a fix for 'headers already sent errors..'
74         /* output captcha image to browser */
75         header('Content-Type: image/jpeg');
76         imagejpeg($image);
77         imagedestroy($image);
78     }
79 
80     public function getVerCode()    {
81         return Yii::app()->session['security_code'];
82     }
83 
84     public function prepare_themes()    {
85         if($this->settings['theme']=='random')    {
86             $this->themes['random'] = array(
87                 'bgcolor'=>array($bg_r=rand(0,255), $bg_g=rand(0,255), $bg_b=rand(0,255)),

Stack Trace

#0
+
 /home/site/wwwroot/protected/extensions/Captcha/YiiCaptcha.php(75): header("Content-Type: image/jpeg")
70         imagettftext($image, $font_size, 0, $x, $y, $text_color, $this->settings['font'] , $code) or die('Error in imagettftext function');
71         Yii::app()->session['security_code']=$code;
72         //$this->Controller->Session->write('security_code',$code);
73         @ob_end_clean(); //clean buffers, as a fix for 'headers already sent errors..'
74         /* output captcha image to browser */
75         header('Content-Type: image/jpeg');
76         imagejpeg($image);
77         imagedestroy($image);
78     }
79 
80     public function getVerCode()    {
#1
+
 /home/site/wwwroot/protected/controllers/SiteController.php(33): YiiCaptcha->create(array(), 0)
28                 $this->render('error', $error);
29         }
30     }
31     
32     public function actionCaptcha($v=0){
33         Yii::app()->acaptcha->create(array(),$v);
34         Yii::app()->end();
35     }
36     
37     public function actionForgotform(){
38         $this->layout = 'login_template_new2';
#11
+
 /home/site/wwwroot/index.php(35): CApplication->run()
30 require_once($yii);
31 $app = Yii::createWebApplication($config);
32 Yii::import('ext.yiiexcel.YiiExcel', true);
33 Yii::registerAutoloader(array('YiiExcel', 'autoload'), true);
34 Yii::app()->setTimeZone('UTC');
35 $app->run();
2026-01-13 07:13:52 nginx/1.28.0 Yii Framework/1.1.29