[CWB] [CQPweb] SQL error in autosetup.php
Scott Sadowsky
ssadowsky at gmail.com
Fri Jun 7 10:08:58 CEST 2019
Quick question that's related to this -- when you update CQPweb from the
SVN repos, should you *always* run autosetup.php?
Cheers,
Scott
On Fri, Jun 7, 2019 at 3:47 AM Hardie, Andrew <a.hardie at lancaster.ac.uk>
wrote:
> I am about to commit the bugfixes for ver 3.2.37. They include a fix for
> this.
>
>
>
> A
>
>
>
> *From:* cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> *On
> Behalf Of *José Manuel Martínez Martínez
> *Sent:* 07 June 2019 08:42
> *To:* Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it
> >
> *Subject:* Re: [CWB] [CQPweb] SQL error in autosetup.php
>
>
>
> Hi Andrew,
>
> Thanks for the pointer.
>
> I've updated to the latest trunk, dropped and recreated the database and
> tried to run the autosetup.php but I'm still getting an error.
>
> The traceback points now to L. 1333
> /var/www/html/cqpweb/lib/environment.php
>
>
>
> ubuntu at ip-172-31-81-8:/var/www/html$ cd /var/www/html/cqpweb/bin
>
> ubuntu at ip-172-31-81-8:/var/www/html/cqpweb/bin$ sudo php autosetup.php
>
>
>
> Now finalising setup for this installation of CQPweb....
>
>
>
> Installing database structure; please wait.
>
>
>
> An SQL query did not run successfully!
>
> Original query:
>
>
>
> CREATE TABLE `catdesc_template_content` (
>
> `template_id`
> int unsigned NOT NULL,
>
> `order_in_template`
> smallint unsigned NOT NULL default 0,
>
> `handle`
> varchar(200) CHARSET ascii COLLATE ascii_bin NOT NULL,
>
> `description`
> varchar(255) CHARSET utf8 COLLATE utf8_general_ci default '',
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-07 07:31 */
>
> 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
> ') ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-07 07:31
> */' at line 6
>
>
>
>
>
> PHP debugging backtrace
>
> =======================
>
> array(4) {
>
> [1]=>
>
> array(4) {
>
> ["file"]=>
>
> string(42) "/var/www/html/cqpweb/lib/exiterror-lib.php"
>
> ["line"]=>
>
> int(300)
>
> ["function"]=>
>
> string(9) "exiterror"
>
> ["args"]=>
>
> array(3) {
>
> [0]=>
>
> array(3) {
>
> [0]=>
>
> string(38) "An SQL query did not run successfully!"
>
> [1]=>
>
> string(449) "Original query:
>
>
>
> CREATE TABLE `catdesc_template_content` (
>
> `template_id`
> int unsigned NOT NULL,
>
> `order_in_template`
> smallint unsigned NOT NULL default 0,
>
> `handle`
> varchar(200) CHARSET ascii COLLATE ascii_bin NOT NULL,
>
> `description`
> varchar(255) CHARSET utf8 COLLATE utf8_general_ci default '',
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-07 07:31 */
>
>
>
> "
>
> [2]=>
>
> string(238) "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 ') ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-07 07:31
> */' at line 6 "
>
> }
>
> [1]=>
>
> NULL
>
> [2]=>
>
> NULL
>
> }
>
> }
>
> [2]=>
>
> array(4) {
>
> ["file"]=>
>
> string(36) "/var/www/html/cqpweb/lib/sql-lib.php"
>
> ["line"]=>
>
> int(198)
>
> ["function"]=>
>
> string(20) "exiterror_mysqlquery"
>
> ["args"]=>
>
> array(3) {
>
> [0]=>
>
> int(1064)
>
> [1]=>
>
> string(223) "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 ') ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-07 07:31
> */' at line 6"
>
> [2]=>
>
> string(429) "CREATE TABLE `catdesc_template_content` (
>
> `template_id`
> int unsigned NOT NULL,
>
> `order_in_template`
> smallint unsigned NOT NULL default 0,
>
> `handle`
> varchar(200) CHARSET ascii COLLATE ascii_bin NOT NULL,
>
> `description`
> varchar(255) CHARSET utf8 COLLATE utf8_general_ci default '',
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-07 07:31
> */"
>
> }
>
> }
>
> [3]=>
>
> array(4) {
>
> ["file"]=>
>
> string(36) "/var/www/html/cqpweb/lib/sql-lib.php"
>
> ["line"]=>
>
> int(1035)
>
> ["function"]=>
>
> string(12) "do_sql_query"
>
> ["args"]=>
>
> array(1) {
>
> [0]=>
>
> string(429) "CREATE TABLE `catdesc_template_content` (
>
> `template_id`
> int unsigned NOT NULL,
>
> `order_in_template`
> smallint unsigned NOT NULL default 0,
>
> `handle`
> varchar(200) CHARSET ascii COLLATE ascii_bin NOT NULL,
>
> `description`
> varchar(255) CHARSET utf8 COLLATE utf8_general_ci default '',
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-07 07:31
> */"
>
> }
>
> }
>
> [4]=>
>
> array(4) {
>
> ["file"]=>
>
> string(38) "/var/www/html/cqpweb/bin/autosetup.php"
>
> ["line"]=>
>
> int(94)
>
> ["function"]=>
>
> string(18) "do_sql_total_reset"
>
> ["args"]=>
>
> array(0) {
>
> }
>
> }
>
> }
>
> PHP Fatal error: Uncaught Error: Call to undefined method
> NotAFullConfig::disconnect_slave_program() in
> /var/www/html/cqpweb/lib/environment.php:1333
>
> Stack trace:
>
> #0 /var/www/html/cqpweb/lib/exiterror-lib.php(231):
> cqpweb_shutdown_environment()
>
> #1 /var/www/html/cqpweb/lib/exiterror-lib.php(300): exiterror(Array, NULL,
> NULL)
>
> #2 /var/www/html/cqpweb/lib/sql-lib.php(198): exiterror_mysqlquery(1064,
> 'You have an err...', 'CREATE TABLE `c...')
>
> #3 /var/www/html/cqpweb/lib/sql-lib.php(1035): do_sql_query('CREATE TABLE
> `c...')
>
> #4 /var/www/html/cqpweb/bin/autosetup.php(94): do_sql_total_reset()
>
> #5 {main}
>
> thrown in /var/www/html/cqpweb/lib/environment.php on line 1333
>
>
>
>
>
> --
>
> José Manuel Martínez Martínez
>
> https://chozelinek.github.io
>
>
>
>
>
> On Thu, Jun 6, 2019 at 8:27 PM Hardie, Andrew <a.hardie at lancaster.ac.uk>
> wrote:
>
> This is the same big reported yesterday by Luigi.
>
>
>
> A
>
>
>
> *From:* cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> *On
> Behalf Of *José Manuel Martínez Martínez
> *Sent:* 06 June 2019 10:43
> *To:* Open source development of the Corpus WorkBench <cwb at sslmit.unibo.it
> >
> *Subject:* [CWB] [CQPweb] SQL error in autosetup.php
>
>
>
> I'm working on Ubuntu 18.04 and I'm getting this error using the following
> configuration file located in /var/www/html/cqpweb/lib/config.inc.php
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *<?php/* ----------------------------------- * * adminstrators' usernames, separated * * by | with no stray whitespace. * * ----------------------------------- */$superuser_username = 'super_user';/* -------------------------- * * database connection config * * -------------------------- */$mysql_webuser = 'cqpweb';$mysql_webpass = 'datamaran';$mysql_schema = 'cqpweb_db';$mysql_server = 'localhost';/* ---------------------- * * server directory paths * * ---------------------- */$cqpweb_tempdir = '/data/cqpweb/tmp';$cqpweb_uploaddir = '/data/cqpweb/uploads';$cwb_datadir = '/data/cqpweb/indexed';$cwb_registry = '/data/cqpweb/registry';/* ----------------------------------- * * locations of programs on the system * * ----------------------------------- */$path_to_cwb = '/usr/local/cwb-3.4.16/bin';?>*
>
>
>
> sudo php autosetup.php
>
>
>
> Now finalising setup for this installation of CQPweb....
>
>
>
> Installing database structure; please wait.
>
>
>
> An SQL query did not run successfully!
>
> Original query:
>
>
>
> CREATE TABLE `system_longvalues` (
>
> `id`
> int unsigned NOT NULL AUTO_INCREMENT
>
> `date_of_storing`
> timestamp NOT NULL default CURRENT_TIMESTAMP on update
> CURRENT_TIMESTAMP, ## better name: last_update????
>
> `value`
> longtext CHARSET utf8 COLLATE utf8_bin NOT NULL,
>
> primary key(`id`)
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-06 09:34 */
>
> 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
> '`date_of_storing` timestamp NOT NULL default CURRENT_TIMESTAMP
> on upd' at line 3
>
>
>
>
>
> PHP debugging backtrace
>
> =======================
>
> array(4) {
>
> [1]=>
>
> array(4) {
>
> ["file"]=>
>
> string(42) "/var/www/html/cqpweb/lib/exiterror-lib.php"
>
> ["line"]=>
>
> int(300)
>
> ["function"]=>
>
> string(9) "exiterror"
>
> ["args"]=>
>
> array(3) {
>
> [0]=>
>
> array(3) {
>
> [0]=>
>
> string(38) "An SQL query did not run successfully!"
>
> [1]=>
>
> string(468) "Original query:
>
>
>
> CREATE TABLE `system_longvalues` (
>
> `id`
> int unsigned NOT NULL AUTO_INCREMENT
>
> `date_of_storing`
> timestamp NOT NULL default CURRENT_TIMESTAMP on update
> CURRENT_TIMESTAMP, ## better name: last_update????
>
> `value`
> longtext CHARSET utf8 COLLATE utf8_bin NOT NULL,
>
> primary key(`id`)
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-06 09:34 */
>
>
>
> "
>
> [2]=>
>
> string(241) "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 '`date_of_storing` timestamp NOT NULL
> default CURRENT_TIMESTAMP on upd' at line 3 "
>
> }
>
> [1]=>
>
> NULL
>
> [2]=>
>
> NULL
>
> }
>
> }
>
> [2]=>
>
> array(4) {
>
> ["file"]=>
>
> string(36) "/var/www/html/cqpweb/lib/sql-lib.php"
>
> ["line"]=>
>
> int(178)
>
> ["function"]=>
>
> string(20) "exiterror_mysqlquery"
>
> ["args"]=>
>
> array(3) {
>
> [0]=>
>
> int(1064)
>
> [1]=>
>
> string(226) "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 '`date_of_storing` timestamp NOT NULL default
> CURRENT_TIMESTAMP on upd' at line 3"
>
> [2]=>
>
> string(448) "CREATE TABLE `system_longvalues` (
>
> `id`
> int unsigned NOT NULL AUTO_INCREMENT
>
> `date_of_storing`
> timestamp NOT NULL default CURRENT_TIMESTAMP on update
> CURRENT_TIMESTAMP, ## better name: last_update????
>
> `value`
> longtext CHARSET utf8 COLLATE utf8_bin NOT NULL,
>
> primary key(`id`)
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-06 09:34
> */"
>
> }
>
> }
>
> [3]=>
>
> array(4) {
>
> ["file"]=>
>
> string(36) "/var/www/html/cqpweb/lib/sql-lib.php"
>
> ["line"]=>
>
> int(1016)
>
> ["function"]=>
>
> string(12) "do_sql_query"
>
> ["args"]=>
>
> array(1) {
>
> [0]=>
>
> string(448) "CREATE TABLE `system_longvalues` (
>
> `id`
> int unsigned NOT NULL AUTO_INCREMENT
>
> `date_of_storing`
> timestamp NOT NULL default CURRENT_TIMESTAMP on update
> CURRENT_TIMESTAMP, ## better name: last_update????
>
> `value`
> longtext CHARSET utf8 COLLATE utf8_bin NOT NULL,
>
> primary key(`id`)
>
> ) ENGINE=InnoDB
>
> /* from User: ??? | Function: ???() | 2019-Jun-06 09:34
> */"
>
> }
>
> }
>
> [4]=>
>
> array(4) {
>
> ["file"]=>
>
> string(38) "/var/www/html/cqpweb/bin/autosetup.php"
>
> ["line"]=>
>
> int(92)
>
> ["function"]=>
>
> string(18) "do_sql_total_reset"
>
> ["args"]=>
>
> array(0) {
>
> }
>
> }
>
> }
>
> PHP Fatal error: Uncaught Error: Call to undefined method
> NotAFullConfig::disconnect_slave_program() in
> /var/www/html/cqpweb/lib/environment.php:1334
>
> Stack trace:
>
> #0 /var/www/html/cqpweb/lib/exiterror-lib.php(231):
> cqpweb_shutdown_environment()
>
> #1 /var/www/html/cqpweb/lib/exiterror-lib.php(300): exiterror(Array, NULL,
> NULL)
>
> #2 /var/www/html/cqpweb/lib/sql-lib.php(178): exiterror_mysqlquery(1064,
> 'You have an err...', 'CREATE TABLE `s...')
>
> #3 /var/www/html/cqpweb/lib/sql-lib.php(1016): do_sql_query('CREATE TABLE
> `s...')
>
> #4 /var/www/html/cqpweb/bin/autosetup.php(92): do_sql_total_reset()
>
> #5 {main}
>
> thrown in /var/www/html/cqpweb/lib/environment.php on line 1334
>
>
> --
>
> José Manuel Martínez Martínez
>
> https://chozelinek.github.io
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>
> _______________________________________________
> CWB mailing list
> CWB at sslmit.unibo.it
> http://liste.sslmit.unibo.it/mailman/listinfo/cwb
>
--
Dr. Scott Sadowsky
Profesor Asistente de Lingüística
Pontificia Universidad Católica de Chile
ssadowsky gmail com
scsadowsky uc cl
http://sadowsky.cl/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20190607/e494864a/attachment-0001.html>
More information about the CWB
mailing list