Page 1 of 1

Can't execute SQL: CREATE TABLE `hesk2_kb_articles`

Posted: Sun Feb 08, 2009 5:13 pm
by jjmatrix
Script URL: http://judejoseph.com/support/
Version of script: Version: 2.0 from 24th January 2009
Hosting company: Hostway
URL of phpinfo.php:http://www.judejoseph.com/phpinfo.php
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Can't execute SQL: CREATE TABLE `hesk2_kb_articles`

and looked through installation posts

Write your message below:

It's my first time ever using this script. Everything seemed fine during installation until the very last step "Setup database settings" when I got the error below. I tried the first time and got the same message, I reinstalled using the same hesk_ table prefix and it confirmed the tables had already been installed so I tried with hesk2_ Unfortunately I do not have phpAdmin and although I can ping the server and have the correct details for the dB I can not connect with MySQL Administrator either:

1. License agreement -> 2. Check setup -> 3. Database settings -> 4. Setup database tables


ERROR=

Can't execute SQL: CREATE TABLE `hesk2_kb_articles` ( `id` smallint(5) unsigned NOT NULL auto_increment, `catid` smallint(5) unsigned NOT NULL, `dt` timestamp NOT NULL default CURRENT_TIMESTAMP, `author` smallint(5) unsigned NOT NULL, `subject` varchar(255) NOT NULL, `content` text NOT NULL, `rating` float NOT NULL, `votes` mediumint(8) unsigned NOT NULL, `views` mediumint(8) unsigned NOT NULL, `type` enum('0','1','2') NOT NULL, `html` enum('0','1') NOT NULL default '0', `art_order` smallint(5) unsigned NOT NULL, `history` text NOT NULL, PRIMARY KEY (`id`), KEY `catid` (`catid`), KEY `type` (`type`), FULLTEXT KEY `subject` (`subject`,`content`) ) 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 'CURRENT_TIMESTAMP, `author` smallint(5) unsigned NOT NULL,

Please notify webmaster at support@domain.com

Posted: Sun Feb 08, 2009 5:24 pm
by Klemen
What version of MySQL are you using, probably a too old one? Try upgrading to MySQL 4.1 or 5

Posted: Tue Feb 17, 2009 5:22 pm
by jjmatrix
This has taken a long time to get working. I thought the check setup stage verified the correct versions etc? I have version 5 and it still says the same thing..

INSTALLATION STEPS:
1. License agreement -> 2. Check setup -> 3. Database settings -> 4. Setup database tables

Check setup
Checking wether your server meets all requirements and that files are setup correctly

Required Your setting Status
PHP version
Should be at least PHP 4 >= 4.3.2 5.2.6-0.dotdeb.1 Passed
hesk_settings.inc.php file
Must be uploaded and writable by the script Exists, Writable Passed
attachments directory
Must exist and be writable by the script Exists, Writable Passed
File uploads
To use file attachments file_uploads must be enabled in PHP Enabled Passed
ZLib Support
PHP must be compiled with ZLib support Enabled Passed
GD Library
Check if GD library is enabled Enabled Passed


All required tests passed, you may now continue to database setup

Posted: Tue Feb 17, 2009 5:39 pm
by Klemen
What version of MySQL you have, not what version of PHP? Check with your host if not sure.

Posted: Tue Feb 17, 2009 5:48 pm
by Henrie
In his phpinfo i found in section mysql

MySQL Support enabled
Active Persistent Links: 0
Active Links: 0
Client API version: 4.1.11
MYSQL_MODULE_TYPE: external
MYSQL_SOCKET: /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE: -I/usr/include/mysql
MYSQL_LIBS: -L/usr/lib -lmysqlclient

I guess version 4.1.11 is to old

Posted: Tue Feb 17, 2009 6:51 pm
by jjmatrix
Thanks Henrie.

What version of MySQL are you using, probably a too old one? Try upgrading to MySQL 4.1 or 5

Is version 4.1.11 too old?

I guess if this first fundamental step is an issue, getting this to work is not going to be simple?

Posted: Tue Feb 17, 2009 6:55 pm
by jjmatrix
Just tried it again and it seem to have worked! Didn't do anything different. Will now test....

Posted: Tue Feb 17, 2009 7:23 pm
by jjmatrix
Ok all was going well until I did an update after making some default settings. I suspect it's not locating the directory as it said it would? I'm now getting this:

Warning: require(language/.inc.php) [function.require]: failed to open stream: No such file or directory in /home/b/9/e/22198/22198/public_html/support/index.php on line 39

Fatal error: require() [function.require]: Failed opening required 'language/.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/b/9/e/22198/22198/public_html/support/index.php on line 39

Posted: Tue Feb 17, 2009 9:23 pm
by Klemen
No idea why the install didn't work before but it does now? The only thing I can think of is a change on the server?

As for the new error, see if you have a line like this in your hesk_settings.inc.php file:

Code: Select all

$hesk_settings['language']
If you do make sure it reads

Code: Select all

$hesk_settings['language']='english';
If you don't have it paste this line somewhere inside.

Posted: Wed Feb 18, 2009 9:42 pm
by jjmatrix
Thanks for your post Klemen

I opened hesk_settings.inc.php but it is completely blank, empty. Help!

Posted: Thu Feb 19, 2009 5:37 pm
by Klemen
Something obviously went wrong during the installation. I would recommend that you:

1. delete the Hesk MySQL tables and all files
2. download a new copy of Hesk
3. upload all the Hesk files again
4. double-check that the hesk_settings.inc.php file is writable (chmod to 666)
5. go through the installation process again

Posted: Sat Feb 21, 2009 9:47 am
by jjmatrix
I did a fresh clean install and all seems to be working fine now.