PHP warning

Cannot modify header information - headers already sent by (output started at /home/uspekh/uspekh.pro/docs/index.php:1)

/home/uspekh/uspekh.pro/docs/framework/web/CHttpRequest.php(763)

751     /**
752      * Redirects the browser to the specified URL.
753      * @param string $url URL to be redirected to. If the URL is a relative one, the base URL of
754      * the application will be inserted at the beginning.
755      * @param boolean $terminate whether to terminate the current application
756      * @param integer $statusCode the HTTP status code. Defaults to 302. See {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html}
757      * for details about HTTP status code.
758      */
759     public function redirect($url,$terminate=true,$statusCode=302)
760     {
761         if(strpos($url,'/')===0)
762             $url=$this->getHostInfo().$url;
763         header('Location: '.$url, true, $statusCode);
764         if($terminate)
765             Yii::app()->end();
766     }
767 
768     /**
769      * Returns the user preferred language.
770      * The returned language ID will be canonicalized using {@link CLocale::getCanonicalID}.
771      * This method returns false if the user does not have language preference.
772      * @return string the user preferred language.
773      */
774     public function getPreferredLanguage()
775     {

Stack Trace

#2
+
 /home/uspekh/uspekh.pro/docs/protected/controllers/frontend/MainController.php(390): CController->redirect("/company/news/")
385                                             $data['title'] = $data['lenta']['title'] . ' — ' . $data['title'];
386                                             $this->render('newsshow', $data);
387                                         }
388                                     } else {
389                                         // новость не найдена
390                                         $this->redirect($pages->make_url(48));
391                                     }
392                                 } elseif ($type == 'page' || empty($type)) { // выбор страницы
393                                     $page = 1;
394                                     $lenta = new ModuleNews();
395                                     if (!empty($type)) $page = floor($type_id);
#10
+
 /home/uspekh/uspekh.pro/docs/protected/behaviors/WebApplicationEndBehavior.php(24): CApplication->run()
19         
20         // обрабатываем событие создания модуля
21         $this->onModuleCreate = array($this, 'changeModulePaths');
22         $this->onModuleCreate(new CEvent ($this->owner));
23         
24         $this->owner->run();        
25     }
26     
27     // обработчик события onModuleCreate
28     public function onModuleCreate($event)
29     {
#12
+
 /home/uspekh/uspekh.pro/docs/index.php(47): CComponent->__call("runEnd", array("frontend"))
42     public static function app() {
43         return parent::app();
44     }
45 }
46 
47 Yii::createWebApplication($config)->runEnd('frontend');
2024-12-22 19:28:39 Apache/2.4.62 (CentOS Stream) PHP/7.0.33 Yii Framework/1.1.12