View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
06129Bug reportsOtherpublic2012-06-20 14:05
Reporteruser19960Assigned Toc_schmitz  
PrioritynormalSeveritycrash 
Status closedResolutionfixed 
Product Version2.00RC1 
Fixed in Version2.00RC3 
Summary06129: create survey - crash
Description

CDbException - insert into - SQLSTATE[22001] -String or binary data would be truncated..

Steps To Reproduce

1.) Login in to the backend
2.) Create a new survey - crash

Additional Information

CDbException

CDbCommand failed to execute the SQL statement: SQLSTATE[22001]: [Microsoft][SQL Server Native Client 11.0][SQL Server]String or binary data would be truncated.. The SQL statement executed was: INSERT INTO [dbo].[lime_surveys] ([admin], [active], [startdate], [expires], [adminemail], [anonymized], [faxto], [format], [savetimings], [template], [language], [additional_languages], [datestamp], [usecookie], [allowregister], [allowsave], [autonumber_start], [autoredirect], [showxquestions], [showgroupinfo], [shownoanswer], [showqnumcode], [showwelcome], [allowprev], [printanswers], [ipaddr], [refurl], [datecreated], [listpublic], [publicstatistics], [publicgraphs], [htmlemail], [sendconfirmation], [tokenanswerspersistence], [assessments], [usecaptcha], [usetokens], [bounce_email], [tokenlength], [bounceprocessing], [bounceaccounttype], [bounceaccounthost], [bounceaccountuser], [bounceaccountpass], [bounceaccountencryption], [showprogress], [allowjumps], [navigationdelay], [nokeyboard], [alloweditaftercompletion], [googleanalyticsstyle], [googleanalyticsapikey], [owner_id], [emailnotificationto], [emailresponseto], [sid]) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7, :yp8, :yp9, :yp10, :yp11, :yp12, :yp13, :yp14, :yp15, :yp16, :yp17, :yp18, :yp19, :yp20, :yp21, :yp22, :yp23, :yp24, :yp25, :yp26, :yp27, :yp28, :yp29, :yp30, :yp31, :yp32, :yp33, :yp34, :yp35, :yp36, :yp37, :yp38, :yp39, :yp40, :yp41, :yp42, :yp43, :yp44, :yp45, :yp46, :yp47, :yp48, :yp49, :yp50, :yp51, :yp52, :yp53, :yp54, :yp55)

C:\inetpub\wwwroot\limesurvey2\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\limesurvey2\framework\db\ar\CActiveRecord.php(1014): CDbCommand->execute()
#1 + C:\inetpub\wwwroot\limesurvey2\framework\db\ar\CActiveRecord.php(787): CActiveRecord->insert(null)
#2 – C:\inetpub\wwwroot\limesurvey2\application\models\Survey.php(201): CActiveRecord->save()
196 }
197
198 $survey = new self;
199 foreach ($data as $k => $v)
200 $survey->$k = $v;
201 $survey->save();
202 return $data['sid'];
203 }
204
205 /*
206
Deletes a survey and all its data
#3 – C:\inetpub\wwwroot\limesurvey2\application\controllers\admin\surveyadmin.php(1548): Survey->insertNewSurvey(array("expires" => "", "startdate" => "", "template" => "default", "owner_id" => 1, ...), false)
1543 if (!is_null($iSurveyId))
1544 {
1545 $aInsertData['wishSID'] = $iSurveyId;
1546 }
1547
1548 $iNewSurveyid = Survey::model()->insertNewSurvey($aInsertData, $xssfilter);
1549 if (!$iNewSurveyid)
1550 die('Survey could not be created.');
1551
1552 // Prepare locale data for surveys_language_settings table
1553 $sTitle = $_POST['surveyls_title'];
#4 unknown(0): SurveyAdmin->insert(null)
#5 + C:\inetpub\wwwroot\limesurvey2\framework\web\actions\CAction.php(107): ReflectionMethod->invokeArgs(SurveyAdmin, array(null))
#6 – C:\inetpub\wwwroot\limesurvey2\application\core\Survey_Common_Action.php(82): CAction->runWithParamsInternal(SurveyAdmin, ReflectionMethod, array("sa" => "insert"))
77 $oMethod = new ReflectionMethod($this, $sDefault);
78 }
79
80 // We're all good to go, let's execute it
81 // runWithParamsInternal would automatically get the parameters of the method and populate them as required with the params
82 return parent::runWithParamsInternal($this, $oMethod, $params);
83 }
84
85 /

86 Some functions have different parameters, which are just an alias of the
87
usual parameters we're getting in the url. This function just populates
#7 + C:\inetpub\wwwroot\limesurvey2\framework\web\CController.php(309): Survey_Common_Action->runWithParams(array("sa" => "insert"))
#8 + C:\inetpub\wwwroot\limesurvey2\framework\web\CController.php(287): CController->runAction(SurveyAdmin)
#9 + C:\inetpub\wwwroot\limesurvey2\framework\web\CController.php(266): CController->runActionWithFilters(SurveyAdmin, array())
#10 + C:\inetpub\wwwroot\limesurvey2\application\controllers\AdminController.php(158): CController->run("survey")
#11 + C:\inetpub\wwwroot\limesurvey2\framework\web\CWebApplication.php(276): AdminController->run("survey")
#12 + C:\inetpub\wwwroot\limesurvey2\framework\web\CWebApplication.php(135): CWebApplication->runController("admin/survey/sa/insert")
#13 + C:\inetpub\wwwroot\limesurvey2\framework\base\CApplication.php(162): CWebApplication->processRequest()
#14 + C:\inetpub\wwwroot\limesurvey2\index.php(171): CApplication->run()

2012-05-24 16:19:39 Microsoft-IIS/7.0 Yii Framework/1.1.10

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)120510
I will donate to the project if issue is resolvedNo
BrowserIE 8, Opera
Database type & versionms sql server 2008
Server OS (if known)win 2008 server + sp2
Webserver software & version (if known)iis7
PHP Versionphp 5.3.13 + Microsoft Drivers 3.0 for PHP 4 SQL Server (v 3.0.1,published: 4/18/2012)

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2012-05-28 15:11

administrator   ~18944

Please install 2.00RC2 and let us know if you still have the problem.
Thank you!

user19960

2012-05-28 17:58

  ~18972

Retested with 2.00RC2 and the bug is still there.
Test environments:

  1. win 7 + IIS 7.5 + MsSql 2012 + php 5.4.3 + Microsoft Drivers 3.0 for PHP
  2. win 2008 + IIS 7.0 + MsSql 2008 + php 5.3.13 + Microsoft Drivers 3.0 for PHP
c_schmitz

c_schmitz

2012-06-20 14:05

administrator   ~19375

2.0RC3 released

Issue History

Date Modified Username Field Change
2012-05-24 14:26 user19960 New Issue
2012-05-24 14:40 user19960 Issue Monitored: user19960
2012-05-28 15:11 c_schmitz Note Added: 18944
2012-05-28 15:11 c_schmitz Assigned To => c_schmitz
2012-05-28 15:11 c_schmitz Status new => feedback
2012-05-28 17:58 user19960 Note Added: 18972
2012-05-28 17:58 user19960 Status feedback => assigned
2012-06-12 13:13 c_schmitz Status assigned => resolved
2012-06-12 13:13 c_schmitz Fixed in Version => 2.00RC3
2012-06-12 13:13 c_schmitz Resolution open => fixed
2012-06-20 14:05 c_schmitz Note Added: 19375
2012-06-20 14:05 c_schmitz Status resolved => closed