CDbException

CDbCommand 无法执行 SQL 语句: CDbCommand 无法准备 SQL 语句: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database. The SQL statement executed was: PRAGMA table_info('mt_option')

/www/wwwroot/rmixconcreteplants.com/web/framework/db/CDbCommand.php(541)

529         {
530             if($this->_connection->enableProfiling)
531                 Yii::endProfile('system.db.CDbCommand.query('.$this->getText().$par.')','system.db.CDbCommand.query');
532 
533             $errorInfo=$e instanceof PDOException ? $e->errorInfo : null;
534             $message=$e->getMessage();
535             Yii::log(Yii::t('yii','CDbCommand::{method}() failed: {error}. The SQL statement executed was: {sql}.',
536                 array('{method}'=>$method, '{error}'=>$message, '{sql}'=>$this->getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');
537 
538             if(YII_DEBUG)
539                 $message.='. The SQL statement executed was: '.$this->getText().$par;
540 
541             throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',
542                 array('{error}'=>$message)),(int)$e->getCode(),$errorInfo);
543         }
544     }
545 
546     /**
547      * Builds a SQL SELECT statement from the given query specification.
548      * @param array $query the query specification in name-value pairs. The following
549      * query options are supported: {@link select}, {@link distinct}, {@link from},
550      * {@link where}, {@link join}, {@link group}, {@link having}, {@link order},
551      * {@link limit}, {@link offset} and {@link union}.
552      * @return string the SQL statement
553      * @since 1.1.6

Stack Trace

#6
+
 /www/wwwroot/rmixconcreteplants.com/web/protected/models/Option.php(20): CActiveRecord::model("Option")
15      * Returns the static model of the specified AR class.
16      * @return Option the static model class
17      */
18     public static function model($className=__CLASS__)
19     {
20         return parent::model($className);
21     }
22 
23     /**
24      * @return string the associated database table name
25      */
#7
+
 /www/wwwroot/rmixconcreteplants.com/web/protected/components/Controller.php(25): Option::model()
20      * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links}
21      * for more details on how to specify this property.
22      */
23     public $breadcrumbs=array();
24     public function init(){
25         $this->optionInfo=Option::model()->findByPk(1);
26     }
27 }
#11
+
 /www/wwwroot/rmixconcreteplants.com/web/common.php(13): CApplication->run()
08 // specify how many levels of call stack should be shown in each log message
09 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
10 require_once($yii);
11 $app=Yii::createWebApplication($config);
12 require_once($globals);
13 $app->run();
2024-03-29 00:46:53 nginx/1.20.1 Yii Framework/1.1.13