Page 1 of 2

Hesk installation trouble

Posted: Wed Jan 28, 2009 11:58 am
by DaveH
Script URL: localhost only currently
Version of script: 2.0
Hosting company: hosted internally
URL of phpinfo.php: n/a
URL of session_test.php: n/a
What terms did you try when SEARCHING for a solution: just browsed the forums for similar issues.

Write your message below:

Hi there. We have been using an earlier version of your helpdesk software (v 0.94.1) for some time now with great success and have been very pleased with it. However, we have recently implemented blackberries and wish to email out not just the title of the call but the message contents to helpdesk staff as well. In order to do this we thought the first step would be to go to your new version of the software. In order not to interrupt the current helpdesk we operate I have begun to install the latest version of the software on a new clean server.

Unfortunately, I think the problem lies with the fact that I have never installed php software before and had no experience with SQL. I have, however, managed to get php installed and got your script half way to up and running. I have also managed to install the latest MySQL server and client administrator and have created an instance called "hesk".

The problem I am experiencing is that when I run the installation (as directed by your readme file) and input the SQL details, the next screen just comes up as "page cannot be displayed" (HTTP 500 server internal error). I am pretty certain the details I have put in are correct (localhost for database host, hesk for database name and correct username and password).

Sadly, due to my lack of experience, I am unsure what to do next to diagnose this problem. Any help at all would be greatly appreciated. Thank you in advance for your assistance.

Dave H

Posted: Wed Jan 28, 2009 2:46 pm
by DaveH
skip above, managed to get it sorted. Was a problem with my php installation. Thought it was something I did wrong.

I am, however, having a new problem. When I go to add a user it says "cannot execute SQL". Any ideas what that might be or how I would go about finding out the info required to find out what the problem is (if that makes sense)?

Thanks again,

Dave H

Posted: Wed Jan 28, 2009 6:11 pm
by Klemen
Turn on debug mode in the settings then try to add a user again and Hesk should give a more detailed error message.

Posted: Thu Jan 29, 2009 9:22 am
by DaveH
Hi Klemen,

Thanks for that, I have followed your instructions and I am getting this error message now:

Can't execute SQL: INSERT INTO `hesk_users` (`user`,`pass`,`isadmin`,`name`,`email`,`signature`) VALUES ('apoland','b690e717c3081171e8038dc1abeaa01775db3c4d','1','Adam','apoland@rosebery.surrey.sch.uk','')

MySQL said:
Field 'heskprivileges' doesn't have a default value

Does this mean I need to add a default value to the field?

Thanks again for your help.

Dave H

Posted: Thu Jan 29, 2009 12:57 pm
by DaveH
skip that, have given the field a default entry and it all works very well now.

Marvellous! :)

Posted: Thu Jan 29, 2009 6:30 pm
by Klemen
Thanks for the note, will add a default value to the script so anyone using the same MySQL version won't have problems.

I have this same problem where do you set thi value

Posted: Sat Jan 31, 2009 5:51 am
by dbower
I have this same problem where do you add a default value to the script? What file is it you set the value?

Posted: Sat Jan 31, 2009 9:29 am
by Klemen
1. Save this code as dbupdate.php:

Code: Select all

<?php 
define('IN_SCRIPT',1); 
define('HESK_PATH',''); 
require(HESK_PATH . 'hesk_settings.inc.php'); 
require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php'); 
require(HESK_PATH . 'inc/common.inc.php'); 
require(HESK_PATH . 'inc/database.inc.php'); 

hesk_dbConnect(); 

$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `heskprivileges` `heskprivileges` VARCHAR( 255 ) DEFAULT '' "; 
hesk_dbQuery($sql); 

echo "Database modified"; 
?>
2. upload to server
3. open in browser
4. delete the file from the server

Work but now errors on Field 'ratingneg' doesn't have a defa

Posted: Mon Feb 02, 2009 3:50 pm
by dbower
Thanks I think this worked for that error now I get a new one:

Can't execute SQL: INSERT INTO `hesk_users` (`user`,`pass`,`isadmin`,`name`,`email`,`signature`) VALUES ('dbower','b89184814d723e9218d247e067dedb858594ffe2','1','David Bower','dbower@gtweed.com','dave')

MySQL said:
Field 'ratingneg' doesn't have a default value




Klemen wrote:1. Save this code as dbupdate.php:

Code: Select all

<?php 
define('IN_SCRIPT',1); 
define('HESK_PATH',''); 
require(HESK_PATH . 'hesk_settings.inc.php'); 
require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php'); 
require(HESK_PATH . 'inc/common.inc.php'); 
require(HESK_PATH . 'inc/database.inc.php'); 

hesk_dbConnect(); 

$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `heskprivileges` `heskprivileges` VARCHAR( 255 ) DEFAULT '' "; 
hesk_dbQuery($sql); 

echo "Database modified"; 
?>
2. upload to server
3. open in browser
4. delete the file from the server

Posted: Mon Feb 02, 2009 4:23 pm
by Klemen
Can you tell me what version of PHP and MySQL are you using and on what system (Linux, Windows, ...)?

Did you do a new Hesk install or updated from an old version (which version was it)?

In the mean time this should fix your users table, but the same problem could be in other tables as well so make sure you test all functions:

Code: Select all

<?php 
define('IN_SCRIPT',1); 
define('HESK_PATH',''); 
require(HESK_PATH . 'hesk_settings.inc.php'); 
require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php'); 
require(HESK_PATH . 'inc/common.inc.php'); 
require(HESK_PATH . 'inc/database.inc.php'); 

hesk_dbConnect(); 

$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `ratingneg` `ratingneg` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `ratingpos` `ratingpos` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `rating` `rating` FLOAT DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `replies` `replies` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 

echo "Database modified"; 
?>

Version info

Posted: Mon Feb 02, 2009 4:54 pm
by dbower
This was a new install on a Windows 2003 R2 std 32bit server.
MySQL 5.1
PHP 5.2.8 Win32
Klemen wrote:Can you tell me what version of PHP and MySQL are you using and on what system (Linux, Windows, ...)?

Did you do a new Hesk install or updated from an old version (which version was it)?

In the mean time this should fix your users table, but the same problem could be in other tables as well so make sure you test all functions:

Code: Select all

<?php 
define('IN_SCRIPT',1); 
define('HESK_PATH',''); 
require(HESK_PATH . 'hesk_settings.inc.php'); 
require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php'); 
require(HESK_PATH . 'inc/common.inc.php'); 
require(HESK_PATH . 'inc/database.inc.php'); 

hesk_dbConnect(); 

$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `ratingneg` `ratingneg` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `ratingpos` `ratingpos` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `rating` `rating` FLOAT DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `replies` `replies` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 

echo "Database modified"; 
?>

This fix worked!

Posted: Mon Feb 02, 2009 5:23 pm
by dbower
Thanks! This is a great program, I'm not a developer but your Helpdesk program seems to work great! I haven’t seen any other errors yet but I will let you know. I would suggest you offer a maintenance subscription plan to companies who would like to start using your product for production use. Could you let me know if I need to make any other changes to the Database or PHP code? Thanks again! :D

David Bower
SAP Portal, Domino & Systems Administrator
Klemen wrote:Can you tell me what version of PHP and MySQL are you using and on what system (Linux, Windows, ...)?

Did you do a new Hesk install or updated from an old version (which version was it)?

In the mean time this should fix your users table, but the same problem could be in other tables as well so make sure you test all functions:

Code: Select all

<?php 
define('IN_SCRIPT',1); 
define('HESK_PATH',''); 
require(HESK_PATH . 'hesk_settings.inc.php'); 
require(HESK_PATH . 'language/'.$hesk_settings['language'].'.inc.php'); 
require(HESK_PATH . 'inc/common.inc.php'); 
require(HESK_PATH . 'inc/database.inc.php'); 

hesk_dbConnect(); 

$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `ratingneg` `ratingneg` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `ratingpos` `ratingpos` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `rating` `rating` FLOAT DEFAULT '0' "; 
hesk_dbQuery($sql); 
$sql = "ALTER TABLE `".$hesk_settings['db_pfix']."users` CHANGE `replies` `replies` MEDIUMINT(8) DEFAULT '0' "; 
hesk_dbQuery($sql); 

echo "Database modified"; 
?>

Posted: Mon Feb 02, 2009 5:59 pm
by Klemen
Just make sure you test the customer interface (if they can submit tickets) and if you can reply to tickets. If this is working normally you shouldn't have problems, but if you do get any other SQL errors post here.

I do know of several large companies using Hesk but for now I don't offer any support/maintenance plans, will think about it for the future.

Sorting by custom feild

Posted: Mon Feb 02, 2009 9:54 pm
by dbower
I've added a Custom field called "Office Location" I wondering if there is a way to add this field in the ticket list so we can sort by Office location of end user. This would be helpful because we have multiple Helpdesk staff assigned to different Office locations.
Klemen wrote:Just make sure you test the customer interface (if they can submit tickets) and if you can reply to tickets. If this is working normally you shouldn't have problems, but if you do get any other SQL errors post here.

I do know of several large companies using Hesk but for now I don't offer any support/maintenance plans, will think about it for the future.

Posted: Tue Feb 03, 2009 12:36 pm
by akash
i will >TRY< and do this for you tonight dbower...
I did the same to the previous version removing a column I did not need but adding one I did

Not sure if I will get a chance but I do want to do some coding tonight
If someone beats me to it then fair enough :- )