[CWB] CQPweb installation errors

José Antonio M M ja.martinezmarin at um.es
Wed Feb 10 02:06:34 CET 2016


Thank you for your reply, Andrew.

I think that if turning only NO_ZERO_DATE off results in error messages, either the code of CQPweb is changed or strict mode has to be disabled globally in mysql.

I have a question and an error to correct in order to continue with this installation.

The question is if the database has to be created as utf8_general_ci or utf8_bin. It seems that autosetup.php creates tables with both collations. The error messages is below.

Thank you so much for your help,
Jose

<tr><td class="concorderror"><p>&nbsp;</p><p class="errormessage">Error # 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
		5,
		5,
		-3,
		3,
		1000000,
		'au'
		)
	/* from User: ??? | Function: add_' at line 38 </p><p>&nbsp;</p></td></tr>

PHP Notice:  Undefined property: stdClass::$all_users_see_backtrace in /www/sites/cqpweb/wwwroot/lib/exiterror.inc.php on line 113

Notice: Undefined property: stdClass::$all_users_see_backtrace in /www/sites/cqpweb/wwwroot/lib/exiterror.inc.php on line 113
PHP Notice:  Undefined property: stdClass::$debug_messages_textonly in /www/sites/cqpweb/wwwroot/lib/exiterror.inc.php on line 140

Notice: Undefined property: stdClass::$debug_messages_textonly in /www/sites/cqpweb/wwwroot/lib/exiterror.inc.php on line 140
		</table>
		PHP Fatal error:  Call to undefined function print_html_footer() in /www/sites/cqpweb/wwwroot/lib/exiterror.inc.php on line 159


José Antonio

> ------------------------------
> 
> Message: 2
> Date: Mon, 8 Feb 2016 12:56:04 +0000
> From: "Hardie, Andrew" <a.hardie en lancaster.ac.uk>
> To: Open source development of the Corpus WorkBench
> 	<cwb en sslmit.unibo.it>
> Subject: Re: [CWB] bugs caused by sql-mode issues.
> Message-ID:
> 	<28078EC3FBF1B940A3EF3D0D19BE351D7FAE649B en EX-0-MB1.lancs.local>
> Content-Type: text/plain; charset="utf-8"
> 
> There are two bugs here, one is an issue in the error reporting system for that script in 3.2.6, which I've now fixed in that branch (you should svn up); and the other is a more general one stemming from your MySQL setup.
> 
> The latter was this message: " Invalid default value for 'last_seen_time' ".
> 
> What this usually indicates is that you have the NO_ZERO_DATE option switched on in the MySQL server (which disallows the use of "0000-00-00" to indicate "never happened"... a convention that CQPweb uses).
> 
> A quick look at the MySQL manual (see here:  http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html ) suggests that NO_ZERO_DATE was switched on by default in MySQL v 5.7 (it was previously not enabled by default).
> 
> Are you using v 5.7? I can't check this myself because my server and dev boxes all have older versions.
> 
> If you are, then the solution is to disable NO_ZERO_DATE (or, in some MySQL versions, STRICT; see here: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-changes ) 
> 
> Here's what the manual says about setting the sql mode (of which NO_ZERO_DATE is part)
> 
>>> 
> To set the SQL mode at server startup, use the --sql-mode="modes" option on the command line, or sql-mode="modes" in an option file such as my.cnf (Unix operating systems) or my.ini (Windows). modes is a list of different modes separated by commas.
> <<
> 
> The default sql-mode in 5.5/5.6. is empty. However, in 5.7 the default sql-mode adds a whole lot of "strictness": including NO_ZERO_DATE.
> 
> So, if you are running v5.7, the mystery is solved.
> 
> It looks as if MySQL are going in the direction of having strict mode on by default, and having strict mode include or imply NO_ZERO_DATE.
> 
> I can see 3 longterm possibilities:
> 
> - Add to the install manual an explanation that NO_ZERO_DATE must be turned off.
> - Add code to CQPweb to turn off strictness as the first thing it does when it connects to mysql
> - Take out anything in CQPweb which requires strictness to be turned off.
> 
> I'm not wholly sure, yet, which of these would make the most sense. I'll have to think about it.
> 
> best
> 
> Andrew.



More information about the CWB mailing list