RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Problems / MySQL server has gone away
Posted:  15 Apr 2016 12:34
While trying to install LuxCal I get the following errors:

Code:


( ! ) Warning: PDO::__construct(): MySQL server has gone away in C:wamp64wwwcommontoolboxd.php on line 25
Call Stack
#    Time    Memory    Function    Location
1    0.0010    333152    {main}( )    ...install440.php:0
2    0.0057    798032    dbConnect( )    ...install440.php:364
3    0.0057    799024    __construct ( )    ...toolboxd.ph


Code:


( ! ) Warning: PDO::__construct(): Error while reading greeting packet. PID=8384 in C:wamp64wwwcommontoolboxd.php on line 25
Call Stack
#    Time    Memory    Function    Location
1    0.0010    333152    {main}( )    ...install440.php:0
2    0.0057    798032    dbConnect( )    ...install440.php:364
3    0.0057    799024    __construct ( )    ...toolboxd.php:25


I timed it several times and I get the error after exactly 1 minute.
Posted:  15 Apr 2016 14:03
I solved the problem as I was using the wrong port, 80 instead of 3306.

But now I get the following error in my sql.log:

Code:


2016.04.15 11:58:01 Script: /install440.php - SQL query error: SQLSTATE[42000]: Syntax error or access violation: 1101 BLOB/TEXT column 'editor' can't have a default value
Query string: CREATE TABLE IF NOT EXISTS `public_events` (
`ID` INTEGER PRIMARY KEY AUTO_INCREMENT,
`type` TINYINT NOT NULL DEFAULT 0,
`private` TINYINT NOT NULL DEFAULT 0,
`title` TEXT DEFAULT NULL,
`venue` TEXT DEFAULT NULL,
`text1` TEXT DEFAULT NULL,
`text2` TEXT DEFAULT NULL,
`text3` TEXT DEFAULT NULL,
`attach` TEXT DEFAULT NULL,
`catID` MEDIUMINT NOT NULL DEFAULT 1,
`userID` MEDIUMINT DEFAULT NULL,
`editor` TEXT NOT NULL DEFAULT '',
`approved` TINYINT NOT NULL DEFAULT 0,
`checked` TEXT DEFAULT NULL,
`notify` TINYINT NOT NULL DEFAULT -1,
`notMail` TEXT DEFAULT NULL,
`sDate` VARCHAR(10) DEFAULT NULL,
`eDate` VARCHAR(10) NOT NULL DEFAULT '9999-00-00',
`xDates` TEXT DEFAULT NULL,
`sTime` VARCHAR(5) DEFAULT NULL,
`eTime` VARCHAR(5) NOT NULL DEFAULT '99:00',
`rType` TINYINT NOT NULL DEFAULT 0,
`rInterval` TINYINT NOT NULL DEFAULT 0,
`rPeriod` TINYINT NOT NULL DEFAULT 0,
`rMonth` TINYINT NOT NULL DEFAULT 0,
`rUntil` VARCHAR(10) NOT NULL DEFAULT '9999-00-00',
`aDateTime` VARCHAR(16) NOT NULL DEFAULT '9999-00-00 00:00',
`mDateTime` VARCHAR(16) NOT NULL DEFAULT '9999-00-00 00:00',
`status` BOOLEAN NOT NULL DEFAULT 0)
Posted:  16 Apr 2016 20:57
Hi there,

This problem was never reported before. So I searched the web for the error message " 1101 BLOB/TEXT column 'editor' can't have a default value". Wow, many hits!
Apparently, according to the official MySQL Reference Manual, TEXT columns cannot have default values, not event an empty string ('')! This is considered a MySQL bug by many database programmers since many years. For one or another reason, this has never been "corrected". Most MySQL implementations accept the default empty string and therefore nobody else reported this problem before. But apparently you have stumbled on a MySQL implementation that doesn't accept a default empty string for a TEXT column.

This is something I can't change overnight. I will see if I can a way around this problem in a next LuxCal version.
Roel