Page 1 of 1
Upgrade 2.1 to 2.2 SQL ERROR
Posted: Wed May 26, 2010 1:06 pm
by lupolo
Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
hesk_kb_attachments
-->
Can't execute SQL: CREATE TABLE `hesk_kb_attachments` ( `att_id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `saved_name` varchar(255) NOT NULL DEFAULT '', `real_name` varchar(255) NOT NULL DEFAULT '', `size` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`att_id`) ) ENGINE=MyISAM
MySQL said:
Table 'hesk_kb_attachments' already exists
Wenn trying to login:
Error:
Can't execute SQL
Please notify webmaster at
webmaster@ace-europe.nl
Posted: Wed May 26, 2010 3:15 pm
by Klemen
Try manually running these SQL statements in phpMyAdmin:
Code: Select all
ALTER TABLE `hesk_tickets` ADD `replierid` SMALLINT UNSIGNED NULL AFTER `lastreplier`;
ALTER TABLE `hesk_tickets` ADD `owner` SMALLINT UNSIGNED NOT NULL DEFAULT '0' AFTER `status` ;
ALTER TABLE `hesk_tickets` ADD `locked` ENUM( '0', '1' ) NOT NULL DEFAULT '0' AFTER `archive`;
ALTER TABLE `hesk_tickets` ADD `history` TEXT NOT NULL DEFAULT '' AFTER `attachments` ;
ALTER TABLE `hesk_users` CHANGE `notify` `notify_new_unassigned` ENUM( '0', '1' ) NOT NULL DEFAULT '1';
ALTER TABLE `hesk_users` ADD `notify_new_my` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `notify_new_unassigned` ,
ADD `notify_reply_unassigned` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `notify_new_my` ,
ADD `notify_reply_my` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `notify_reply_unassigned` ,
ADD `notify_assigned` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `notify_reply_my` ,
ADD `notify_pm` ENUM( '0', '1' ) NOT NULL DEFAULT '1' AFTER `notify_assigned` ;
UPDATE `hesk_users` SET `categories` = TRIM(TRAILING ',' FROM `categories`);
UPDATE `hesk_users` SET `features` = TRIM(TRAILING ',' FROM `features`);
CREATE TABLE `hesk_mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`from` smallint(5) unsigned NOT NULL,
`to` smallint(5) unsigned NOT NULL,
`subject` varchar(255) NOT NULL,
`message` text NOT NULL,
`read` enum('0','1') NOT NULL DEFAULT '0',
`deletedby` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `recipients` (`from`,`to`,`cc`)
) ENGINE=MyISAM;
If the error persists open the hesk_settings.inc.php file in Notepad and change
to
then let me know what the error says.
Posted: Wed May 26, 2010 5:16 pm
by lupolo
Wenn opening the admin login panel:
Code: Select all
Notice: Undefined index: a in /home/sites/site16926/web/helpdesk/admin/index.php on line 47
Notice: Undefined index: hesk_username in /home/sites/site16926/web/helpdesk/inc/common.inc.php on line 558
Notice: Undefined index: hesk_p in /home/sites/site16926/web/helpdesk/inc/common.inc.php on line 559
Wenn trying to import the string:
Code: Select all
SQL query:
ALTER TABLE `hesk_users` CHANGE `notify` `notify_new_unassigned` ENUM( '0', '1' ) NOT NULL DEFAULT '1';
MySQL said: Documentation
#1054 -
Code: Select all
SQL query:
UPDATE `hesk_users` SET `features` = TRIM( TRAILING ',' FROM `features` ) ;
MySQL said: Documentation
#1054 -
I think its's a SQL error, wenn doing a fresh install its working alright, but with the fresh install its also giving the first line error add the admin login panel
Posted: Wed Jun 02, 2010 9:27 am
by springmoon
I'm having the same problem when running those SQL query.
There is another error when run the query:
Code: Select all
ALTER TABLE `hesk_tickets` ADD `history` TEXT NOT NULL DEFAULT '' AFTER `attachments` ;
Error: BLOB/TEXT column 'history' can't have a default value. ErrorNr:1101.
Posted: Wed Jun 02, 2010 4:05 pm
by Klemen
What version of MySQL are you two using?
Posted: Thu Jun 03, 2010 1:32 am
by springmoon
I'm using MySQL 5.1.
I tried to remove DEFAULT '' from the query and manage to alter the table but when come to insert query. Another default value error happen.
Insert error : Field 'history' doesn't have a default value.
I'm a newbie to MySQL and PHP. I'm not sure whether i can remove the DEFAULT ''. Sorry if i shouldn't did that.
Posted: Thu Jun 03, 2010 2:25 am
by springmoon
I just read an article and it says that BLOB and TEXT cannot have DEFAULT value in MySQL 5.0.
http://dev.mysql.com/doc/refman/5.0/en/blob.html
Is there any way to solve this problem in Hesk 2.2? Now cannot create ticket.

Posted: Thu Jun 03, 2010 6:59 am
by lupolo
@Klemmen
Sorry iám using MySQL client version: 5.0.38
Posted: Thu Jun 03, 2010 2:45 pm
by Klemen
Thanks for reporting, I'll look into it over the weekend.
Can't execute SQL
Posted: Fri Jun 18, 2010 1:05 pm
by krunion
springmoon,
did you ever get this fixed if so can you tell me how I'm having the same issue?
Thanks,
Posted: Sun Jun 20, 2010 5:31 pm
by Klemen
krunion make sure you are not using BETA version, but the final release 2.2
Re: Can't execute SQL
Posted: Wed Aug 18, 2010 3:03 am
by springmoon
krunion wrote:
springmoon,
did you ever get this fixed if so can you tell me how I'm having the same issue?
Thanks,
krunion,
Sorry for late reply. Have a long time didn't check mail.
FYI. Remove the DEFAULT '' from the query.
eg: ALTER TABLE `hesk_tickets` ADD `history` TEXT NOT NULL DEFAULT '' AFTER `attachments` ;

ALTER TABLE `hesk_tickets` ADD `history` TEXT NOT NULL AFTER `attachments` ;
Hope this can help.
Good luck.
Re: Upgrade 2.1 to 2.2 SQL ERROR
Posted: Mon Aug 30, 2010 7:40 pm
by MacJoyful
Script URL:
http://slc-admin3.scilabs.lsa.umich.edu ... /index.php
Version of script: hesk 2.2
Hosting company: umich.edu
Server software is: Apache/2.2.14 (Unix) PHP/5.3.1 mod_ssl/2.2.14 OpenSSL/0.9.8l
URL of phpinfo.php:
http://slc-admin3.scilabs.lsa.umich.edu/~jed2/test.php
URL of session_test.php:
http://slc-admin3.scilabs.lsa.umich.edu ... n_test.php
What terms did you try when SEARCHING for a solution: "SQL Error"
We encountered the same issues as were reported previously in the earlier posts. I ended up installing as a new installation and manually importing the data one table at a time which was extremely time-consuming. This post is just an FYI so that you will take into account these issues as you work on fixing various issues in this new version.