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/www.mingzhengjx.com/framework/db/CDbCommand.php(543)

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

Stack Trace

#8
+
 /www/wwwroot/www.mingzhengjx.com/protected/components/Controller.php(25): CActiveRecord->findByPk(1)
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 }
#12
+
 /www/wwwroot/www.mingzhengjx.com/common.php(14): CApplication->run()
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 require_once($yii);
12 $app = Yii::createWebApplication($config);
13 require_once($globals);
14 $app->run();
#13
+
 /www/wwwroot/www.mingzhengjx.com/index.php(13): require_once("/www/wwwroot/www.mingzhengjx.com/common.php")
08     $config=dirname(__FILE__).'/protected/config/main.php';
09 }
10 
11 
12 $globals = dirname(__FILE__) . '/protected/globals.php';
13 require_once('./common.php');
2024-03-28 23:21:05 nginx/1.15.10 Yii Framework/1.1.16-dev