D:\WebServer\Apache2.2\htdocs\yii\framework\db\CDbCommand.php(354)
342 return $n; 343 } 344 catch(Exception $e) 345 { 346 if($this->_connection->enableProfiling) 347 Yii::endProfile('system.db.CDbCommand.execute('.$this->getText().$par.')','system.db.CDbCommand.execute'); 348 $errorInfo = $e instanceof PDOException ? $e->errorInfo : null; 349 $message = $e->getMessage(); 350 Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.', 351 array('{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand'); 352 if(YII_DEBUG) 353 $message .= '. The SQL statement executed was: '.$this->getText().$par; 354 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}', 355 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo); 356 } 357 } 358 359 /** 360 * Executes the SQL statement and returns query result. 361 * This method is for executing an SQL query that returns result set. 362 * @param array $params input parameters (name=>value) for the SQL execution. This is an alternative 363 * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing 364 * them in this way can improve the performance. Note that if you pass parameters in this way, 365 * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa. 366 * binding methods and the input parameters this way can improve the performance.
#0 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\db\ar\CActiveRecord.php(1017): CDbCommand->execute() 1012 { 1013 Yii::trace(get_class($this).'.insert()','system.db.ar.CActiveRecord'); 1014 $builder=$this->getCommandBuilder(); 1015 $table=$this->getMetaData()->tableSchema; 1016 $command=$builder->createInsertCommand($table,$this->getAttributes($attributes)); 1017 if($command->execute()) 1018 { 1019 $primaryKey=$table->primaryKey; 1020 if($table->sequenceName!==null) 1021 { 1022 if(is_string($primaryKey) && $this->$primaryKey===null) |
#1 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\db\ar\CActiveRecord.php(796): CActiveRecord->insert(null) 791 * @return boolean whether the saving succeeds 792 */ 793 public function save($runValidation=true,$attributes=null) 794 { 795 if(!$runValidation || $this->validate($attributes)) 796 return $this->getIsNewRecord() ? $this->insert($attributes) : $this->update($attributes); 797 else 798 return false; 799 } 800 801 /** |
#2 |
+
–
D:\WebServer\Apache2.2\htdocs\testapp\protected\extensions\galleryManager\models\GalleryPhoto.php(114): CActiveRecord->save(true, null) 109 )); 110 } 111 112 public function save($runValidation = true, $attributes = null) 113 { 114 parent::save($runValidation, $attributes); 115 if ($this->rank == null) { 116 $this->rank = $this->id; 117 $this->setIsNewRecord(false); 118 $this->save(false); 119 } |
#3 |
+
–
D:\WebServer\Apache2.2\htdocs\testapp\protected\extensions\galleryManager\GalleryController.php(47): GalleryPhoto->save() 42 if (isset($_POST['GalleryPhoto'])) 43 $model->attributes = $_POST['GalleryPhoto']; 44 45 $imageFile = CUploadedFile::getInstance($model, 'image'); 46 $model->file_name = $imageFile->getName(); 47 $model->save(); 48 49 $model->setImage($imageFile->getTempName()); 50 header("Content-Type: application/json"); 51 echo CJSON::encode( 52 array( |
#4 |
unknown(0): GalleryController->actionAjaxUpload("1")
|
#5 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\web\actions\CAction.php(107): ReflectionMethod->invokeArgs(GalleryController, array("1")) 102 else if($param->isDefaultValueAvailable()) 103 $ps[]=$param->getDefaultValue(); 104 else 105 return false; 106 } 107 $method->invokeArgs($object,$ps); 108 return true; 109 } 110 } |
#6 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\web\actions\CInlineAction.php(48): CAction->runWithParamsInternal(GalleryController, ReflectionMethod, array("gallery_id" => "1")) 43 { 44 $methodName='action'.$this->getId(); 45 $controller=$this->getController(); 46 $method=new ReflectionMethod($controller, $methodName); 47 if($method->getNumberOfParameters()>0) 48 return $this->runWithParamsInternal($controller, $method, $params); 49 else 50 return $controller->$methodName(); 51 } 52 53 } |
#7 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\web\CController.php(309): CInlineAction->runWithParams(array("gallery_id" => "1")) 304 { 305 $priorAction=$this->_action; 306 $this->_action=$action; 307 if($this->beforeAction($action)) 308 { 309 if($action->runWithParams($this->getActionParams())===false) 310 $this->invalidActionParams($action); 311 else 312 $this->afterAction($action); 313 } 314 $this->_action=$priorAction; |
#8 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\web\CController.php(287): CController->runAction(CInlineAction) 282 * @see runAction 283 */ 284 public function runActionWithFilters($action,$filters) 285 { 286 if(empty($filters)) 287 $this->runAction($action); 288 else 289 { 290 $priorAction=$this->_action; 291 $this->_action=$action; 292 CFilterChain::create($this,$action,$filters)->run(); |
#9 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\web\CController.php(266): CController->runActionWithFilters(CInlineAction, array()) 261 { 262 if(($parent=$this->getModule())===null) 263 $parent=Yii::app(); 264 if($parent->beforeControllerAction($this,$action)) 265 { 266 $this->runActionWithFilters($action,$this->filters()); 267 $parent->afterControllerAction($this,$action); 268 } 269 } 270 else 271 $this->missingAction($actionID); |
#10 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\web\CWebApplication.php(283): CController->run("ajaxupload") 278 { 279 list($controller,$actionID)=$ca; 280 $oldController=$this->_controller; 281 $this->_controller=$controller; 282 $controller->init(); 283 $controller->run($actionID); 284 $this->_controller=$oldController; 285 } 286 else 287 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 288 array('{route}'=>$route===''?$this->defaultController:$route))); |
#11 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\web\CWebApplication.php(142): CWebApplication->runController("admin/gallery/ajaxUpload") 137 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 138 $_GET[$name]=$value; 139 } 140 else 141 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 142 $this->runController($route); 143 } 144 145 /** 146 * Registers the core application components. 147 * This method overrides the parent implementation by registering additional core components. |
#12 |
+
–
D:\WebServer\Apache2.2\htdocs\yii\framework\base\CApplication.php(162): CWebApplication->processRequest() 157 */ 158 public function run() 159 { 160 if($this->hasEventHandler('onBeginRequest')) 161 $this->onBeginRequest(new CEvent($this)); 162 $this->processRequest(); 163 if($this->hasEventHandler('onEndRequest')) 164 $this->onEndRequest(new CEvent($this)); 165 } 166 167 /** |
#13 |
+
–
D:\WebServer\Apache2.2\htdocs\testapp\index.php(13): CApplication->run() 08 defined('YII_DEBUG') or define('YII_DEBUG',true); 09 // specify how many levels of call stack should be shown in each log message 10 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3); 11 12 require_once($yii); 13 Yii::createWebApplication($config)->run(); |