Yii Framework Forum: Open-School - Yii Framework Forum

Jump to content

  • (10 Pages)
  • +
  • « First
  • 8
  • 9
  • 10
  • You cannot start a new topic
  • You cannot reply to this topic

Open-School Open-School - integrated school management system Developed using YII Rate Topic: ***** 17 Votes

#181 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 920
  • Joined: 20-April 11
  • Location:India

Posted 23 November 2016 - 04:25 AM

View Postibon, on 12 November 2016 - 12:55 AM, said:

CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'activity_time'. The SQL statement executed was:





Did you solved this issue?
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#182 User is offline   Rajith R 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 920
  • Joined: 20-April 11
  • Location:India

Posted 21 April 2017 - 02:26 AM

https://open-school.org/pricing

Open-School 2.5.5 Released

Try here http://tryopenschool.com/
Rajith Ramachandran,
Wiwo inc.
| Mobile: 919995504508
0

#183 User is offline   Sourav2017 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 2
  • Joined: 24-December 17

Posted 24 December 2017 - 03:13 AM

Hello Rajith, I am trying to install the free community version 2.2.3&lt;br /&gt;<br />
I have installed WAMP.&lt;br /&gt;<br />
I am having following error while installing. Please help&lt;br /&gt;<br />
CDbException&lt;br /&gt;<br />
CDbCommand failed to execute the SQL statement: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'lastvisit_at'. The SQL statement executed was: &lt;br /&gt;<br />
&lt;br /&gt;<br />
-- --------------------------------------------------------&lt;br /&gt;<br />
&lt;br /&gt;<br />
--&lt;br /&gt;<br />
-- Table structure for table `users`&lt;br /&gt;<br />
--&lt;br /&gt;<br />
&lt;br /&gt;<br />
CREATE TABLE IF NOT EXISTS `users` (&lt;br /&gt;<br />
`id` int(11) NOT NULL AUTO_INCREMENT,&lt;br /&gt;<br />
`username` varchar(20) DEFAULT NULL,&lt;br /&gt;<br />
`password` varchar(128) DEFAULT NULL,&lt;br /&gt;<br />
`email` varchar(128) DEFAULT NULL,&lt;br /&gt;<br />
`activkey` varchar(128) NOT NULL DEFAULT '',&lt;br /&gt;<br />
`create_at` timestamp NULL DEFAULT NULL,&lt;br /&gt;<br />
`lastvisit_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',&lt;br /&gt;<br />
`superuser` int(1) NOT NULL DEFAULT '0',&lt;br /&gt;<br />
`status` int(1) NOT NULL DEFAULT '0',&lt;br /&gt;<br />
PRIMARY KEY (`id`),&lt;br /&gt;<br />
UNIQUE KEY `email` (`email`),&lt;br /&gt;<br />
UNIQUE KEY `username` (`username`),&lt;br /&gt;<br />
KEY `status` (`status`),&lt;br /&gt;<br />
KEY `superuser` (`superuser`)&lt;br /&gt;<br />
) ENGINE=InnoDB DEFAULT CHARSET=utf8&lt;br /&gt;<br />
&lt;br /&gt;<br />
C:\wamp\www\core\db\CDbCommand.php(336)&lt;br /&gt;<br />
&lt;br /&gt;<br />
324 return $n;&lt;br /&gt;<br />
325 }&lt;br /&gt;<br />
326 catch(Exception $e)&lt;br /&gt;<br />
327 {&lt;br /&gt;<br />
328 if($this-&amp;gt;_connection-&amp;gt;enableProfiling)&lt;br /&gt;<br />
329 Yii::endProfile('system.db.CDbCommand.execute('.$this-&amp;gt;getText().')','system.db.CDbCommand.execute');&lt;br /&gt;<br />
330 $errorInfo = $e instanceof PDOException ? $e-&amp;gt;errorInfo : null;&lt;br /&gt;<br />
331 $message = $e-&amp;gt;getMessage();&lt;br /&gt;<br />
332 Yii::log(Yii::t('yii','CDbCommand::execute() failed: {error}. The SQL statement executed was: {sql}.',&lt;br /&gt;<br />
333 array('{error}'=&amp;gt;$message, '{sql}'=&amp;gt;$this-&amp;gt;getText().$par)),CLogger::LEVEL_ERROR,'system.db.CDbCommand');&lt;br /&gt;<br />
334 if(YII_DEBUG)&lt;br /&gt;<br />
335 $message .= '. The SQL statement executed was: '.$this-&amp;gt;getText().$par;&lt;br /&gt;<br />
336 throw new CDbException(Yii::t('yii','CDbCommand failed to execute the SQL statement: {error}',&lt;br /&gt;<br />
337 array('{error}'=&amp;gt;$message)),(int)$e-&amp;gt;getCode(),$errorInfo);&lt;br /&gt;<br />
338 }&lt;br /&gt;<br />
339 }&lt;br /&gt;<br />
340 &lt;br /&gt;<br />
341 /**&lt;br /&gt;<br />
342 * Executes the SQL statement and returns query result.&lt;br /&gt;<br />
343 * This method is for executing an SQL query that returns result set.&lt;br /&gt;<br />
344 * @param array $params input parameters (name=&amp;gt;value) for the SQL execution. This is an alternative&lt;br /&gt;<br />
345 * to {@link bindParam} and {@link bindValue}. If you have multiple input parameters, passing&lt;br /&gt;<br />
346 * them in this way can improve the performance. Note that if you pass parameters in this way,&lt;br /&gt;<br />
347 * you cannot bind parameters or values using {@link bindParam} or {@link bindValue}, and vice versa.&lt;br /&gt;<br />
348 * binding methods and the input parameters this way can improve the performance.&lt;br /&gt;<br />
Stack Trace&lt;br /&gt;<br />
#0 &lt;br /&gt;<br />
– C:\wamp\www\protected\modules\Install\controllers\DefaultController.php(222): CDbCommand-&amp;gt;execute()&lt;br /&gt;<br />
217 //create db schema&lt;br /&gt;<br />
218 $sql = $this-&amp;gt;getSql($this-&amp;gt;module-&amp;gt;structuresPath);&lt;br /&gt;<br />
219 $sqlArr = $this-&amp;gt;splitQueries($sql);&lt;br /&gt;<br />
220 foreach ($sqlArr as $script) {&lt;br /&gt;<br />
221 if (preg_match('/(CREATE\s+TABLE|DROP\s+TABLE|ALTER\s+TABLE|CREATE\s+VIEW|DROP\s+VIEW)/i', $script))&lt;br /&gt;<br />
222 $result = $connection-&amp;gt;createCommand($script)-&amp;gt;execute();&lt;br /&gt;<br />
223 }&lt;br /&gt;<br />
224 &lt;br /&gt;<br />
225 //insert example data&lt;br /&gt;<br />
226 $dataPath = $this-&amp;gt;module-&amp;gt;dataPath;&lt;br /&gt;<br />
227 if (isset($_POST['example']) === true) {&lt;br /&gt;<br />
#1 &lt;br /&gt;<br />
+ C:\wamp\www\core\web\actions\CInlineAction.php(50): DefaultController-&amp;gt;actionStep3()&lt;br /&gt;<br />
#2 &lt;br /&gt;<br />
+ C:\wamp\www\core\web\CController.php(300): CInlineAction-&amp;gt;runWithParams(array(&amp;quot;r&amp;quot; =&amp;gt; &amp;quot;Install/default/step3&amp;quot;))&lt;br /&gt;<br />
#3 &lt;br /&gt;<br />
+ C:\wamp\www\core\web\CController.php(278): CController-&amp;gt;runAction(CInlineAction)&lt;br /&gt;<br />
#4 &lt;br /&gt;<br />
+ C:\wamp\www\core\web\CController.php(257): CController-&amp;gt;runActionWithFilters(CInlineAction, array())&lt;br /&gt;<br />
#5 &lt;br /&gt;<br />
+ C:\wamp\www\core\web\CWebApplication.php(277): CController-&amp;gt;run(&amp;quot;step3&amp;quot;)&lt;br /&gt;<br />
#6 &lt;br /&gt;<br />
+ C:\wamp\www\core\web\CWebApplication.php(136): CWebApplication-&amp;gt;runController(&amp;quot;Install/default/step3&amp;quot;)&lt;br /&gt;<br />
#7 &lt;br /&gt;<br />
+ C:\wamp\www\core\base\CApplication.php(158): CWebApplication-&amp;gt;processRequest()&lt;br /&gt;<br />
#8 &lt;br /&gt;<br />
– C:\wamp\www\install.php(40): CApplication-&amp;gt;run()&lt;br /&gt;<br />
35 &lt;br /&gt;<br />
36 // remove the following line when in production mode&lt;br /&gt;<br />
37 defined('YII_DEBUG') or define('YII_DEBUG',true);&lt;br /&gt;<br />
38 require_once($yii); &lt;br /&gt;<br />
39 &lt;br /&gt;<br />
40 Yii::createWebApplication($config)-&amp;gt;run();
0

Share this topic:


  • (10 Pages)
  • +
  • « First
  • 8
  • 9
  • 10
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users