Upgrade 2.1 to 2.2 SQL ERROR

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Upgrade 2.1 to 2.2 SQL ERROR

Post 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
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post 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

Code: Select all

$hesk_settings['debug_mode']=0;
to

Code: Select all

$hesk_settings['debug_mode']=1;
then let me know what the error says.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Post 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
springmoon
Posts: 4
Joined: Wed Jun 02, 2010 9:18 am

Post 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.
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

What version of MySQL are you two using?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
springmoon
Posts: 4
Joined: Wed Jun 02, 2010 9:18 am

Post 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.
springmoon
Posts: 4
Joined: Wed Jun 02, 2010 9:18 am

Post 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. :(
lupolo
Posts: 214
Joined: Mon Apr 20, 2009 2:12 pm

Post by lupolo »

@Klemmen

Sorry iám using MySQL client version: 5.0.38
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Thanks for reporting, I'll look into it over the weekend.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
krunion
Posts: 1
Joined: Wed Jul 30, 2008 2:22 pm

Can't execute SQL

Post by krunion »

springmoon wrote: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. :(
springmoon,

did you ever get this fixed if so can you tell me how I'm having the same issue?

Thanks,
Klemen
Site Admin
Posts: 10143
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

krunion make sure you are not using BETA version, but the final release 2.2
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
springmoon
Posts: 4
Joined: Wed Jun 02, 2010 9:18 am

Re: Can't execute SQL

Post by springmoon »

krunion wrote:
springmoon wrote: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. :(
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` ;
:arrow: ALTER TABLE `hesk_tickets` ADD `history` TEXT NOT NULL AFTER `attachments` ;
Hope this can help. :)

Good luck.
MacJoyful
Posts: 17
Joined: Wed Sep 02, 2009 9:58 pm

Re: Upgrade 2.1 to 2.2 SQL ERROR

Post 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.
Post Reply