[CWB] [CQPweb] SQL error in autosetup.php
José Manuel Martínez Martínez
chozelinek at gmail.com
Thu Jun 6 11:42:48 CEST 2019
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://liste.sslmit.unibo.it/pipermail/cwb/attachments/20190606/48fbc252/attachment-0001.html>
More information about the CWB
mailing list