PHP warning

Undefined global variable $_SESSION

/home3/jilan/public_html/beta_thora_bachke_rahna/kya_hal_hai_beta/framework/web/auth/CWebUser.php(624)

612     /**
613      * Returns all flash messages.
614      * This method is similar to {@link getFlash} except that it returns all
615      * currently available flash messages.
616      * @param boolean $delete whether to delete the flash messages after calling this method.
617      * @return array flash messages (key => message).
618      * @since 1.1.3
619      */
620     public function getFlashes($delete=true)
621     {
622         $flashes=array();
623         $prefix=$this->getStateKeyPrefix().self::FLASH_KEY_PREFIX;
624         $keys=array_keys($_SESSION);
625         $n=strlen($prefix);
626         foreach($keys as $key)
627         {
628             if(!strncmp($key,$prefix,$n))
629             {
630                 $flashes[substr($key,$n)]=$_SESSION[$key];
631                 if($delete)
632                     unset($_SESSION[$key]);
633             }
634         }
635         if($delete)
636             $this->setState(self::FLASH_COUNTERS,array());

Stack Trace

#0
+
 /home3/jilan/public_html/protected/views/site/login.php(160): CWebUser->getFlashes()
155             <?php if (!isset($_SESSION['user_id'])) : ?>
156              <div class="border border-primary p-4" >
157                 <h1 class="text-center mt-4">Login Form</h1>
158            
159                 <?php
160                 $flashMessages = Yii::app()->user->getFlashes();
161                 if ($flashMessages) {
162                     Yii::app()->clientScript->registerScript(
163                         'myHideEffect',
164                         '$(".flash-error").animate({opacity: 0.9}, 5500).fadeOut(5000);',
165                         CClientScript::POS_READY
#5
+
 /home3/jilan/public_html/protected/controllers/SiteController.php(357): CController->render("login", array("model" => LoginForm))
352             $model->attributes = $_POST['LoginForm'];
353             if ($model->validate() && $model->login()) {
354                 require_once dirname(__FILE__) . '/login.php';
355             }
356         }
357         $this->render('login', array('model' => $model));
358     }
359 
360     public function actionLogout() {
361         unset($_SESSION['username']);
362         unset($_SESSION['uid']);
#13
+
 /home3/jilan/public_html/index.php(22): CApplication->run()
17     defined('YII_DEBUG') or define('YII_DEBUG', true);
18 // specify how many levels of call stack should be shown in each log message
19     defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
20 
21     require_once($yii);
22     Yii::createWebApplication($config)->run();
23 }  
2026-03-10 18:32:31 Apache Yii Framework/1.1.10