PHP warning

Cannot modify header information - headers already sent by (output started at /home/myservic/public_html/websites/protected/config/main.php:1)

/home/myservic/public_html/websites/core/web/CHttpRequest.php(1075)

1063         return $cookie;
1064     }
1065 
1066     /**
1067      * Sends a cookie.
1068      * @param CHttpCookie $cookie cookie to be sent
1069      */
1070     protected function addCookie($cookie) {
1071         $value = $cookie->value;
1072         if ($this->_request->enableCookieValidation)
1073             $value = Yii::app()->getSecurityManager()->hashData(serialize($value));
1074         if (version_compare(PHP_VERSION, '5.2.0', '>='))
1075             setcookie($cookie->name, $value, $cookie->expire, $cookie->path, $cookie->domain, $cookie->secure, $cookie->httpOnly);
1076         else
1077             setcookie($cookie->name, $value, $cookie->expire, $cookie->path, $cookie->domain, $cookie->secure);
1078     }
1079 
1080     /**
1081      * Deletes a cookie.
1082      * @param CHttpCookie $cookie cookie to be deleted
1083      */
1084     protected function removeCookie($cookie) {
1085         if (version_compare(PHP_VERSION, '5.2.0', '>='))
1086             setcookie($cookie->name, '', 0, $cookie->path, $cookie->domain, $cookie->secure, $cookie->httpOnly);
1087         else

Stack Trace

#3
+
 /home/myservic/public_html/websites/protected/extensions/eltSwitch/ELTSwitch.php(512): CMap->offsetSet("eltLanguage", CHttpCookie)
507      */
508     protected function setCookie($attribute, $value) {
509         if (!empty($this->cookieDays) && (int) $this->cookieDays > 0) {
510             $cookie = new CHttpCookie($attribute, $value);
511             $cookie->expire = time() + 60 * 60 * 24 * (int) $this->cookieDays;
512             Yii::app()->request->cookies[$attribute] = $cookie;
513         }
514     }
515 
516     /**
517      * Remove from session / cookie
#4
+
 /home/myservic/public_html/websites/protected/extensions/eltSwitch/ELTSwitch.php(178): ELTSwitch->setCookie("eltLanguage", "ES")
173                     if (!$this->isFixedLanguage()) {
174                         //set cookie if $this->cookieDays > 0
175                         if ($force){
176                             Yii::app()->cookies->removeCookie(self::KEY_LANGUAGE);
177                         }
178                         $this->setCookie(self::KEY_LANGUAGE, $language);
179                         //always save to users session too
180                         Yii::app()->user->setState(self::KEY_LANGUAGE, $language);
181                     }
182                     return true;
183                 }
#5
+
 /home/myservic/public_html/websites/protected/extensions/eltSwitch/ELTSwitch.php(107): ELTSwitch->setLanguage("ES")
102      * Set the applications theme / language
103      */
104     public function init() {
105         parent::init();
106         $this->setTheme($this->getTheme());
107         $this->setLanguage($this->getLanguage());
108     }
109 
110     /**
111      * Set the current theme
112      * Check if allowed, log error if not exists or allowed
2016-09-25 01:58:04 Apache/2.4.16 (Unix) OpenSSL/1.0.1e-fips mod_jk/1.2.37 mod_bwlimited/1.4 Yii Framework/1.1.13