PHP warning

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

/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/CHttpRequest.php(803)

791     /**
792      * Redirects the browser to the specified URL.
793      * @param string $url URL to be redirected to. Note that when URL is not
794      * absolute (not starting with "/") it will be relative to current request URL.
795      * @param boolean $terminate whether to terminate the current application
796      * @param integer $statusCode the HTTP status code. Defaults to 302. See {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html}
797      * for details about HTTP status code.
798      */
799     public function redirect($url,$terminate=true,$statusCode=302)
800     {
801         if(strpos($url,'/')===0 && strpos($url,'//')!==0)
802             $url=$this->getHostInfo().$url;
803         header('Location: '.$url, true, $statusCode);
804         if($terminate)
805             Yii::app()->end();
806     }
807 
808     /**
809      * Parses an HTTP Accept header, returning an array map with all parts of each entry.
810      * Each array entry consists of a map with the type, subType, baseType and params, an array map of key-value parameters,
811      * obligatorily including a `q` value (i.e. preference ranking) as a double.
812      * For example, an Accept header value of <code>'application/xhtml+xml;q=0.9;level=1'</code> would give an array entry of
813      * <pre>
814      * array(
815      *        'type' => 'application',

Stack Trace

#2
+
 /home/foxx7136/public_html/wal/protected/controllers/front/PageController.php(171): CController->redirect("/images/resources/lpa-form-2.pdf")
166         $model = ModPageResourceFormDownload::model()->findByPk($id);
167         if($model)
168         {
169             $model->hits +=1;
170             $model->save();
171             $this->redirect($model->GetFile($model->id));
172             
173         }
174     }
175 
176 
#12
+
 /home/foxx7136/public_html/wal/protected/components/WebApplicationEndBehavior.php(25): CApplication->run()
20         // Attach the changeModulePaths event handler
21         // and raise it.
22         $this->onModuleCreate = array($this, 'changeModulePaths');
23         $this->onModuleCreate(new CEvent($this->owner));
24   
25         $this->owner->run(); // Run application.
26     }
27   
28     // This event should be raised when CWebApplication
29     // or CWebModule instances are being initialized.
30     public function onModuleCreate($event)
#15
+
 /home/foxx7136/public_html/wal/frontend.php(10): CComponent->__call("runEnd", array("front"))
05 // Remove the following lines when in production mode
06 defined('YII_DEBUG') or define('YII_DEBUG', true);
07 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
08   
09 require_once($yii);
10 Yii::createWebApplication($config)->runEnd('front');
2019-02-17 02:40:03 Apache/2.4.37 (cPanel) OpenSSL/1.0.2q mod_bwlimited/1.4 Yii Framework/1.1.14
Application Log
Timestamp Level Category Message
02:40:03.762104 error php
Cannot modify header information - headers already sent by (output started
at /home/foxx7136/public_html/wal/protected/config/main.php:1)
(/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/CHttpRequest.php:803)
Stack trace:
#0
/home/foxx7136/public_html/wal/protected/controllers/front/PageController.php(171):
PageController->redirect()
#1 unknown(0): PageController->actionResourceFormDownload()
#2
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/actions/CAction.php(108):
ReflectionMethod->invokeArgs()
#3
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/actions/CInlineAction.php(47):
CInlineAction->runWithParamsInternal()
#4
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/CController.php(308):
CInlineAction->runWithParams()
#5
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/CController.php(286):
PageController->runAction()
#6
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/CController.php(265):
PageController->runActionWithFilters()
#7
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/CWebApplication.php(282):
PageController->run()
#8
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/web/CWebApplication.php(141):
CWebApplication->runController()
#9
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/base/CApplication.php(180):
CWebApplication->processRequest()
#10
/home/foxx7136/public_html/wal/protected/components/WebApplicationEndBehavior.php(25):
CWebApplication->run()
#11 unknown(0): WebApplicationEndBehavior->runEnd()
#12
/home/foxx7136/public_html/wal/protected/vendor/Yii/framework/base/CComponent.php(261):
call_user_func_array()
#13 /home/foxx7136/public_html/wal/frontend.php(10):
CWebApplication->__call()
#14 /home/foxx7136/public_html/wal/frontend.php(10):
CWebApplication->runEnd()
REQUEST_URI=/ResourceFormDownload/8.html
in
/home/foxx7136/public_html/wal/protected/controllers/front/PageController.php
(171)
in
/home/foxx7136/public_html/wal/protected/components/WebApplicationEndBehavior.php
(25)
in /home/foxx7136/public_html/wal/frontend.php (10)