Welcome, Guest
Username: Password: Remember me

TOPIC: Error when accessing admin page after first install

Error when accessing admin page after first install 1 year 2 months ago #98983

  • Adammm
  • Adammm's Avatar
Hi,

I've just installed LimeSurvey 2.00+ (build 130802) on a Windows Server 2003 box (first time I've used this software). I followed the installation instructions on this website and the install completed okay (it identified that I had all of the required components).

I can now access the index page of LimeSurvey fine but when I try to access the admin page I receive the following error:-

DbCommand failed to execute the SQL statement: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'stg_value' at row 1. The SQL statement executed was: INSERT INTO `settings_global` (`stg_value`, `stg_name`) VALUES (:yp0, :yp1)

Full stack trace after setting $debug=1 :-

C:\Inetpub\wwwroot\survey\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().')','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.
Stack Trace
#0
– C:\Inetpub\wwwroot\survey\framework\db\ar\CActiveRecord.php(1014): CDbCommand->execute()
1009 {
1010 Yii::trace(get_class($this).'.insert()','system.db.ar.CActiveRecord');
1011 $builder=$this->getCommandBuilder();
1012 $table=$this->getMetaData()->tableSchema;
1013 $command=$builder->createInsertCommand($table,$this->getAttributes($attributes));
1014 if($command->execute())
1015 {
1016 $primaryKey=$table->primaryKey;
1017 if($table->sequenceName!==null)
1018 {
1019 if(is_string($primaryKey) && $this->$primaryKey===null)
#1
– C:\Inetpub\wwwroot\survey\framework\db\ar\CActiveRecord.php(787): CActiveRecord->insert(null)
782 * @return boolean whether the saving succeeds
783 */
784 public function save($runValidation=true,$attributes=null)
785 {
786 if(!$runValidation || $this->validate($attributes))
787 return $this->getIsNewRecord() ? $this->insert($attributes) : $this->update($attributes);
788 else
789 return false;
790 }
791
792 /**
#2
– C:\Inetpub\wwwroot\survey\application\helpers\globalsettings_helper.php(86): CActiveRecord->save()
81 else
82 {
83 $record = new Settings_global;
84 $record->stg_name = $settingname;
85 $record->stg_value = $settingvalue;
86 $record->save();
87 }
88
89 Yii::app()->setConfig($settingname, $settingvalue);
90 }
91
#3
– C:\Inetpub\wwwroot\survey\application\helpers\common_helper.php(5698): setGlobalSetting("updateversions", "{"errorcode":"503","errorhtml":"<!DOCTYPE html PUBLIC \"-\/\/W3C...")
5693 function updateCheck()
5694 {
5695 $updateinfo=getUpdateInfo();
5696 if (count($updateinfo) && trim(Yii::app()->getConfig('buildnumber'))!='')
5697 {
5698 setGlobalSetting('updateversions',json_encode($updateinfo));
5699 $sUpdateNotificationType = getGlobalSetting('updatenotification');
5700 switch ($sUpdateNotificationType)
5701 {
5702 case 'stable':
5703 // Only show update if in stable (master) branch
#4
– C:\Inetpub\wwwroot\survey\application\controllers\AdminController.php(35): updateCheck()
30 $updatelastcheck = getGlobalSetting('updatelastcheck');
31
32 $this->_sessioncontrol();
33
34 if (Yii::app()->getConfig('buildnumber') != "" && Yii::app()->getConfig('updatecheckperiod') > 0 && $updatelastcheck < dateShift(date("Y-m-d H:i:s"), "Y-m-d H:i:s", "-". Yii::app()->getConfig('updatecheckperiod')." days"))
35 updateCheck();
36
37 //unset(Yii::app()->session);
38
39 $this->user_id = Yii::app()->user->getId();
40 Yii::app()->setConfig('adminimageurl', Yii::app()->getConfig('styleurl').Yii::app()->getConfig('admintheme').'/images/');
#5
– C:\Inetpub\wwwroot\survey\application\core\LSYii_Controller.php(37): AdminController->_init()
32 $this->loadLibrary('LS.LS');
33 $this->loadHelper('globalsettings');
34 $this->loadHelper('common');
35 $this->loadHelper('expressions.em_manager');
36 $this->loadHelper('replacements');
37 $this->_init();
38 }
39
40 /**
41 * Check that installation was already done by looking for config.php
42 * Will redirect to the installer script if not exists.
#6
– C:\Inetpub\wwwroot\survey\framework\web\CWebApplication.php(349): LSYii_Controller->__construct("admin", null)
344 require($classFile);
345 if(class_exists($className,false) && is_subclass_of($className,'CController'))
346 {
347 $id[0]=strtolower($id[0]);
348 return array(
349 new $className($controllerID.$id,$owner===$this?null:$owner),
350 $this->parseActionParams($route),
351 );
352 }
353 return null;
354 }
#7
– C:\Inetpub\wwwroot\survey\framework\web\CWebApplication.php(270): CWebApplication->createController("admin")
265 * @param string $route the route of the current request. See {@link createController} for more details.
266 * @throws CHttpException if the controller could not be created.
267 */
268 public function runController($route)
269 {
270 if(($ca=$this->createController($route))!==null)
271 {
272 list($controller,$actionID)=$ca;
273 $oldController=$this->_controller;
274 $this->_controller=$controller;
275 $controller->init();
#8
– C:\Inetpub\wwwroot\survey\framework\web\CWebApplication.php(135): CWebApplication->runController("admin")
130 foreach(array_splice($this->catchAllRequest,1) as $name=>$value)
131 $_GET[$name]=$value;
132 }
133 else
134 $route=$this->getUrlManager()->parseUrl($this->getRequest());
135 $this->runController($route);
136 }
137
138 /**
139 * Registers the core application components.
140 * This method overrides the parent implementation by registering additional core components.
#9
– C:\Inetpub\wwwroot\survey\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 /**
#10
– C:\Inetpub\wwwroot\survey\index.php(178): CApplication->run()
173 *
174 */
175 require_once BASEPATH . 'yii' . EXT;
176 require_once APPPATH . 'core/LSYii_Application' . EXT;
177
178 Yii::createApplication('LSYii_Application', APPPATH . 'config/config' . EXT)->run();
179
180 /* End of file index.php */
181 /* Location: ./index.php */

Any clues as to where I might be going wrong?
The administrator has disabled public write access.

Error when accessing admin page after first install 1 year 2 months ago #98985

  • Adammm
  • Adammm's Avatar
The issue is that this box is on an intranet and normally has no access to the Internet.

Logging on to my company's internet gateway resolved the problem (but this won't be a permanent fix).

Is this the intended behaviour of LimeSurvey? Thanks.
Last Edit: 1 year 2 months ago by Adammm. Reason: Spelling mistakes
The administrator has disabled public write access.

Error when accessing admin page after first install 11 months 1 week ago #101584

This error occurs due to the attempt to connect to a host to verify limesurvey updates . To be on the internal network , the verification fails , and tries to insert the error log with more than 1600 characters in the table settings_global , whose field stg_value has only 255 characters . This is a BUG of lime . As a workaround , change the column to text solves the problem . I hope this bug is fixed in a new release .

'{ " errorcode " : " 10060 Could not connect to the host \ " update.limesurvey.org \ " :
fsockopen ( ) [ <a href=''function.fsockopen''>
function.fsockopen < \ / a> ] : unable to connect to 78.46.71.100:80
(A connection attempt failed because the connected party did not respond after enquiry.c a period of time , or established connection failed because connected host has failed to respond . \ R \ n ) " , " ErrorHtml " : " 10060 Could not connect to the host \ " update.limesurvey.org \ " : fsockopen ( ) [ function.fsockopen <a href=''function.fsockopen''> < \ / a> ] : unable to connect to 78.46.71.100:80 (A connection attempt failed because the connected party did not respond enquiry.c after a period of time , or established connection failed because connected host has failed to respond . \ r \ n ) " } '
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.110 seconds
Donation Image