0
Fixed

PHP Error when adding a user

BrianG 13 year бұрын updated by Ricardo 13 year бұрын 2

PHP Error

Cannot modify header information - headers already sent by (output started at /homepages/44/d353854819/htdocs/tonkapps/scrumrf/protected/messages/en/gui.php:1)

/homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CHttpRequest.php(657)

645     /**646      * Redirects the browser to the specified URL.647      * @param string $url URL to be redirected to. If the URL is a relative one, the base URL of648      * the application will be inserted at the beginning.649      * @param boolean $terminate whether to terminate the current application650      * @param integer $statusCode the HTTP status code. Defaults to 302. See {@link http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html}651      * for details about HTTP status code. This parameter has been available since version 1.0.4.652      */653     public function redirect($url,$terminate=true,$statusCode=302)654     {655         if(strpos($url,'/')===0)656             $url=$this->getHostInfo().$url;657         header('Location: '.$url, true, $statusCode);658         if($terminate)659             Yii::app()->end();660     }661 662     /**663      * Returns the user preferred language.664      * The returned language ID will be canonicalized using {@link CLocale::getCanonicalID}.665      * This method returns false if the user does not have language preference.666      * @return string the user preferred language.667      */668     public function getPreferredLanguage()669     {

Stack Trace

#0
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CHttpRequest.php(657): header("Location: http://www.scrumrf.com/user/2519", true, 302)
#1
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CController.php(1005): CHttpRequest->redirect("/user/2519", true, 302)
#2
  /homepages/44/d353854819/htdocs/tonkapps/scrumrf/protected/controllers/UserController.php(161): CController->redirect(array("view", "id" => "2519"))
156                 $model->password = $_POST['password'];157             }158             159             if ($model->save()) {160                 user()->setFlash('success', t('msg', 'user.save.ok'));161                 $this->redirect(array('view', 'id' => $model->user_id));162             }163         }164 165         $this->render('create', array(166             'model' => $model,
#3
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/actions/CInlineAction.php(50): UserController->actionCreate()
#4
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CController.php(300): CInlineAction->runWithParams(array())
#5
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/filters/CFilterChain.php(133): CController->runAction(CInlineAction)
#6
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
#7
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/filters/CFilterChain.php(130): CFilter->filter(CFilterChain)
#8
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/filters/CFilter.php(41): CFilterChain->run()
#9
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CController.php(1122): CFilter->filter(CFilterChain)
#10
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/filters/CInlineFilter.php(59): CController->filterAccessControl(CFilterChain)
#11
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/filters/CFilterChain.php(130): CInlineFilter->filter(CFilterChain)
#12
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CController.php(283): CFilterChain->run()
#13
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CController.php(257): CController->runActionWithFilters(CInlineAction, array("accessControl", array("application.filters.YXssFilter", "clean" => "*", "tags" => "strict", "actions" => "all")))
#14
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CWebApplication.php(328): CController->run("create")
#15
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/web/CWebApplication.php(121): CWebApplication->runController("user/create")
#16
+
  /homepages/44/d353854819/htdocs/tonkapps/yii/framework/base/CApplication.php(155): CWebApplication->processRequest()
#17
  /homepages/44/d353854819/htdocs/tonkapps/scrumrf/index.php(15): CApplication->run()
10 // specify how many levels of call stack should be shown in each log message11 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);12 13 require_once($globals);14 require_once($yii);15 Yii::createWebApplication($config)->run();
2011-11-30 21:25:20 Apache Yii Framework/1.1.7

Answer

Answer
Fixed
Hi Brian!
Try now to check if it works ok.
Thanks for your feedback!
Cheers!