PHP warning

Cannot modify header information - headers already sent by (output started at C:\Open_Server_5_2_7\OSPanel\domains\kleverol.com.ua\protected\config\main.php:1)

C:\Open_Server_5_2_7\OSPanel\domains\kleverol.com.ua\framework\web\CHttpRequest.php(1380)

1368     }
1369 
1370     /**
1371      * Sends a cookie.
1372      * @param CHttpCookie $cookie cookie to be sent
1373      */
1374     protected function addCookie($cookie)
1375     {
1376         $value=$cookie->value;
1377         if($this->_request->enableCookieValidation)
1378             $value=Yii::app()->getSecurityManager()->hashData(serialize($value));
1379         if(version_compare(PHP_VERSION,'5.2.0','>='))
1380             setcookie($cookie->name,$value,$cookie->expire,$cookie->path,$cookie->domain,$cookie->secure,$cookie->httpOnly);
1381         else
1382             setcookie($cookie->name,$value,$cookie->expire,$cookie->path,$cookie->domain,$cookie->secure);
1383     }
1384 
1385     /**
1386      * Deletes a cookie.
1387      * @param CHttpCookie $cookie cookie to be deleted
1388      */
1389     protected function removeCookie($cookie)
1390     {
1391         if(version_compare(PHP_VERSION,'5.2.0','>='))
1392             setcookie($cookie->name,'',0,$cookie->path,$cookie->domain,$cookie->secure,$cookie->httpOnly);

Stack Trace

#3
+
 C:\Open_Server_5_2_7\OSPanel\domains\kleverol.com.ua\protected\components\LanguageManager.php(69): CMap->offsetSet("language", CHttpCookie)
64      */
65     private function saveUserLanguage() {
66         Yii::app()->user->setState($this->languageKey, Yii::app()->language);
67         $cookie = new CHttpCookie($this->languageKey, Yii::app()->language);
68         $cookie->expire = time() + Yii::app()->params['duration']['year'];
69         Yii::app()->request->cookies[$this->languageKey] = $cookie;
70     }
71 
72     /**
73      * Contains rules to creating url with language prefix.
74      * Parse existing url and return new url with specified language prefix.
#4
+
 C:\Open_Server_5_2_7\OSPanel\domains\kleverol.com.ua\protected\components\LanguageManager.php(38): LanguageManager->saveUserLanguage()
33             $lang = Language::model()->getDefaultLanguage();
34         
35 
36         if (Language::model()->isActive($lang)) {
37             Yii::app()->language = $lang;
38             $this->saveUserLanguage();
39 
40             // try to find language in $_SESSION
41         } else if (Yii::app()->user->hasState($this->languageKey)) {
42             $lang = Yii::app()->user->getState($this->languageKey);
43             if (Language::model()->isActive($lang))
#5
+
 C:\Open_Server_5_2_7\OSPanel\domains\kleverol.com.ua\protected\components\Controller.php(20): LanguageManager->handleLanguage()
15 
16     public function init() {
17         $this->registerCommonScripts();
18 
19         // Установка языка
20         Yii::app()->getComponent('languageManager')->handleLanguage();
21     }
22 
23     /**
24      * Wrapper for render methods.
25      * Allows to use one render method for common and AJAX requests.
2017-12-13 17:50:15 Apache Yii Framework/1.1.15