[RESOLVED] HESK 2.3 MySQL Error

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

[RESOLVED] HESK 2.3 MySQL Error

Post by Raven »

Script URL: http://www.crikey-thatsmint.com/hesk23/
Version of script: 2.3
Hosting company: IIS 7.5 on 127.0.0.1
URL of phpinfo.php: http://www.crikey-thatsmint.com/hesk_stuff/
URL of session_test.php: http://www.crikey-thatsmint.com/hesk_stuff/
What terms did you try when SEARCHING for a solution: MySQL Error, BLOB/TEXT, and heskprivileges

Write your message below:

Hi, as you can see I'm trying to install v2.3 of Hesk but I am getting the following error message:
Error:

Can't execute SQL: CREATE TABLE `hesk_users` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(20) NOT NULL DEFAULT '', `pass` char(40) NOT NULL, `isadmin` enum('0','1') NOT NULL DEFAULT '0', `name` varchar(50) NOT NULL DEFAULT '', `email` varchar(255) NOT NULL DEFAULT '', `signature` varchar(255) NOT NULL DEFAULT '', `categories` varchar(255) NOT NULL DEFAULT '', `afterreply` enum('0','1','2') NOT NULL DEFAULT '0', `notify_new_unassigned` enum('0','1') NOT NULL DEFAULT '1', `notify_new_my` enum('0','1') NOT NULL DEFAULT '1', `notify_reply_unassigned` enum('0','1') NOT NULL DEFAULT '1', `notify_reply_my` enum('0','1') NOT NULL DEFAULT '1', `notify_assigned` enum('0','1') NOT NULL DEFAULT '1', `notify_pm` enum('0','1') NOT NULL DEFAULT '1', `default_list` varchar(255) NOT NULL DEFAULT '', `autoassign` enum('0','1') NOT NULL DEFAULT '1', `heskprivileges` TEXT NOT NULL DEFAULT '', `ratingneg` mediumint(8) unsigned NOT NULL DEFAULT '0', `ratingpos` mediumint(8) unsigned NOT NULL DEFAULT '0', `rating` float NOT NULL DEFAULT '0', `replies` mediumint(8) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `autoassign` (`autoassign`) ) ENGINE=MyISAM

MySQL said:
BLOB/TEXT column 'heskprivileges' can't have a default value



WARNING
Debug mode is enabled. Make sure you disable debug mode in settings once HESK is installed and working properly.
Any help with this would be great ;)

FYI I am using IIS (Internet Information Services) 7.5, php 5.2.17, and MySQL 5.1.58 all hosted on a Windows 7 Ultimate box.

Cheers
Last edited by Raven on Tue Sep 20, 2011 8:51 pm, edited 1 time in total.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK 2.3 MySQL Error

Post by Klemen »

Try this:

1. delete any hesk23 tables that have been created
2. find this in the install.php file (or update.php if you're updating):

Code: Select all

TEXT NOT NULL DEFAULT ''
change it to just

Code: Select all

TEXT NOT NULL
3. try installing again.

Good luck getting your fully-customized nice-looking help desk updated to 2.3 :lol:
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
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: HESK 2.3 MySQL Error

Post by Raven »

Hi Klemen,

Thanks for your help - that did it :D

My 'fully-customized nice-looking help desk' (thank you for that) will be easy to update - from a clients point of view its simply a few pages that require any alterations. Besides, my 'theme' is only skin deep meaning none of the code that makes Hesk work actually needs to be touched :lol:

Glad you took on some of my ideas by the way such as password strength and a few other little bits ;)

Thanks again - I look forward to getting to grips with email piping now that it is a feature as opossed to a hack :P

PS
Why are you advertising the SysAid HelpDesk in the footer these days?
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK 2.3 MySQL Error

Post by Klemen »

Glad to hear that did it, I updated the download file with the change as well.

Yes, I do like some of your ideas :wink: One small but important thing I particularly like and will try to implement is the "Steps" when submitting a ticket. I think it nicely organizes and groups input fields and is very user-friendly.

SysAid is sponsoring HESK - I think it's for the benefit of both. They help me cover expenses and on the other hand many people visiting hesk.com are searching for a more complex solution than what HESK has to offer so I try to point them into a direction.
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
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: HESK 2.3 MySQL Error

Post by Raven »

Just to let you know that I have my custom fields setup to show slightly differently.

The standard "Before Message" custom field is appended just after "Step 1 - Contact Information" meaning I can ask for telephone numbers etc...

The standard "After Message" custom field is then added just below the above making up step 2 "Step 2 - Technical Information".

I know it won't suit everyone but it made my site a little more logical.

Step 1
Name
Email
*custom field area 1*

Step 2
*custom field area 2*

Step 3
Subject
Message
Anti-spam question
Attachments
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK 2.3 MySQL Error

Post by Klemen »

Yeah, if/when I add a feature like this to Hesk I will see if I can make the user able to group them as they like.

It's not hard to customize a copy, the trick is to figure it out in a way that everyone can make use of it for their own specific setting.

But, like said, I really like the form with fields grouped into "steps" as it makes complicated forms much easier to follow/submit by users.
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
copetti
Posts: 14
Joined: Mon Aug 08, 2011 6:09 pm

Re: HESK 2.3 MySQL Error

Post by copetti »

My file has: TEXT NOT NULL DEFAULT '' and still does not work. :?
Raven
Posts: 172
Joined: Sat Jun 20, 2009 12:39 am

Re: HESK 2.3 MySQL Error

Post by Raven »

copetti wrote:My file has: TEXT NOT NULL DEFAULT '' and still does not work. :?
If you are getting the same error as I did the you need to change it to:

Code: Select all

TEXT NOT NULL
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK 2.3 MySQL Error

Post by Klemen »

coppeti like Raven said you need to remove DEFAULT '' to make it work.

Or just download HESK 2.3 again, I already updated it there.
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
Friction
Posts: 3
Joined: Sun Sep 18, 2011 8:54 am

Re: HESK 2.3 MySQL Error

Post by Friction »

I ran into the same error message but in my index.php file there is no TEXT NOT NULL DEFAULT ''

This is my error message just in case it's a little different

Code: Select all

Error:

Can't execute SQL: CREATE TABLE `hesk_users` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(20) NOT NULL DEFAULT '', `pass` char(40) NOT NULL, `isadmin` enum('0','1') NOT NULL DEFAULT '0', `name` varchar(50) NOT NULL DEFAULT '', `email` varchar(255) NOT NULL DEFAULT '', `signature` varchar(255) NOT NULL DEFAULT '', `categories` varchar(255) NOT NULL DEFAULT '', `afterreply` enum('0','1','2') NOT NULL DEFAULT '0', `notify_new_unassigned` enum('0','1') NOT NULL DEFAULT '1', `notify_new_my` enum('0','1') NOT NULL DEFAULT '1', `notify_reply_unassigned` enum('0','1') NOT NULL DEFAULT '1', `notify_reply_my` enum('0','1') NOT NULL DEFAULT '1', `notify_assigned` enum('0','1') NOT NULL DEFAULT '1', `notify_pm` enum('0','1') NOT NULL DEFAULT '1', `default_list` varchar(255) NOT NULL DEFAULT '', `autoassign` enum('0','1') NOT NULL DEFAULT '1', `heskprivileges` TEXT NOT, `ratingneg` mediumint(8) unsigned NOT NULL DEFAULT '0', `ratingpos` mediumint(8) unsigned NOT NULL DEFAULT '0', `rating` float NOT NULL DEFAULT '0', `replies` mediumint(8) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `autoassign` (`autoassign`) ) ENGINE=MyISAM

MySQL said:
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 ' `ratingneg` mediumint(8) unsigned NOT NULL DEFAULT '0', `ratingpos` mediumi' at line 19

 

WARNING
Debug mode is enabled. Make sure you disable debug mode in settings once HESK is installed and working properly.
Last edited by Friction on Sun Sep 18, 2011 9:00 am, edited 1 time in total.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK 2.3 MySQL Error

Post by Klemen »

It's in the install.php or update.php file inside the "install" folder.

Again, if you are having problems just download version 2.3 again, it's been updated.
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
Friction
Posts: 3
Joined: Sun Sep 18, 2011 8:54 am

Re: HESK 2.3 MySQL Error

Post by Friction »

The "TEXT NOT NULL DEFAULT ''" is NOT in my install.php file as it shouldn't be as I am using the lastest version.

There are multiple copies of "text NOT NULL"
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK 2.3 MySQL Error

Post by Klemen »

Sorry, my bad, I understood as if you are getting the same error as above.

Try this install file instead: http://www.phpjunkyard.com/extras/install_23_1.zip
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
Friction
Posts: 3
Joined: Sun Sep 18, 2011 8:54 am

Re: HESK 2.3 MySQL Error

Post by Friction »

I found the problem.

In your updated 2.3 version in the install.php file where it is instructed to create the tables

Code: Select all

CREATE TABLE `".hesk_dbEscape($hesk_settings['db_pfix'])."users` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `user` varchar(20) NOT NULL DEFAULT '',
  `pass` char(40) NOT NULL,
  `isadmin` enum('0','1') NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL DEFAULT '',
  `email` varchar(255) NOT NULL DEFAULT '',
  `signature` varchar(255) NOT NULL DEFAULT '',
  `categories` varchar(255) NOT NULL DEFAULT '',
  `afterreply` enum('0','1','2') NOT NULL DEFAULT '0',
  `notify_new_unassigned` enum('0','1') NOT NULL DEFAULT '1',
  `notify_new_my` enum('0','1') NOT NULL DEFAULT '1',
  `notify_reply_unassigned` enum('0','1') NOT NULL DEFAULT '1',
  `notify_reply_my` enum('0','1') NOT NULL DEFAULT '1',
  `notify_assigned` enum('0','1') NOT NULL DEFAULT '1',
  `notify_pm` enum('0','1') NOT NULL DEFAULT '1',
  `default_list` varchar(255) NOT NULL DEFAULT '',
  `autoassign` enum('0','1') NOT NULL DEFAULT '1',
  `heskprivileges` TEXT NOT,
  `ratingneg` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `ratingpos` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `rating` float NOT NULL DEFAULT '0',
  `replies` mediumint(8) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `autoassign` (`autoassign`)
)
where it says "`heskprivileges` TEXT NOT," when it should be "`heskprivileges` TEXT NOT NULL,"
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: HESK 2.3 MySQL Error

Post by Klemen »

Exactly, thanks for pointing that out - it's updated now correctly and a fix is included in my previous post as well.
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
Post Reply