RESOLVED: Attachments error

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Sampler
Posts: 9
Joined: Mon Mar 10, 2008 1:08 pm

RESOLVED: Attachments error

Post by Sampler »

Script URL: http://support.optimisaplc.com/
Version of script: 0.94.1
Hosting company: my own server
URL of phpinfo.php: http://support.optimisaplc.com/phpinfo.php
URL of session_test.php: Not heard of this
What terms did you try when SEARCHING for a solution: hesk_attachments

Write your message below:

When attempting to attach a file to a ticket users get the following error:

Code: Select all

Can't execute SQL: INSERT INTO `hesk_attachments` (`ticket_id`,`saved_name`,`real_name`,`size`) VALUES ('9PTJPE2H2R', '9PTJPE2H2R_1b0a1768fbb0eac01b55087485349596.gif', 'dilbert2007166671129.gif', '22909')

MySQL said:
Table 'helpdesk.hesk_attachments' doesn't exist
As an admin when attempting to use the delete ticket feature I get

Code: Select all

Can't execute SQL: DELETE FROM `hesk_attachments` WHERE `ticket_id`='THBDSG8AJR'

MySQL said:
Table 'helpdesk.hesk_attachments' doesn't exist
I did have trouble originally installing Hesk due to a blank page after step three, it would connect to the DB and using the debug install.php it would say "Installing files..." and that would be it.

I resolved the issue by downloading a patched file (unable to find the thread again now when searching) which seems to have done the trick - everything but the attachments seems to be working fine from a site point of view.

Looking through the install.php file I can't see anything that referes to an attachements table within the database - is there supposed to be one? My current database has:
  • hesk_categories
    hesk_replies
    hesk_std_replies
    hesk_tickets
    hesk_users
The other niggling problem is users outside our domain don't seem to be getting emails (either user confirmation or admin alerts) yet everyone within our domain recieve them without issue.

Any help would be gratefully appreciated - this is a fantastic app for our small company, we've used 0.93 for about a year and loved it!

P.S. RE: sessions_test above - I have several phpBB forums that run fine on the server so I presume that sessions are working fine. If you know what needs to go into a sessions_test.php file than let me know an I'll create one.

Cheers
Last edited by Sampler on Mon Mar 10, 2008 4:06 pm, edited 1 time in total.
This message has been transmitted on 100% recycled electrons.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Your hesk_attachments table is obviously missing. The patched file you used probably wasn't the correct one for the version you have now or if you upgraded from a previous version you didn't use the "Upgrade" option from the install file? You can try manually executing this SQL in phpMyAdmin:

Code: Select all

CREATE TABLE `hesk_attachments` (
  `att_id` mediumint(8) unsigned NOT NULL auto_increment,
  `ticket_id` varchar(10) NOT NULL default '',
  `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`),
  KEY `ticket_id` (`ticket_id`)
) ENGINE=MyISAM
but it's possible other database errors might be there in case you really didn't upgrade properly.


As for the e-mail problem this can be set by your host (disallow sending e-mails to 3rd party domains from scripts), you will need to ask them to enable it.
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
Sampler
Posts: 9
Joined: Mon Mar 10, 2008 1:08 pm

Post by Sampler »

Hi Kleman

Thanks, just run the query and it's worked a charm - the whole HESK system seems to be working perfect now.

Should've mentioned due to the blank page issue this is a fresh install not an upgrade. With this database field added everything's fine.

I did download a fresh copy of Hesk to look through the install.php file for the database settings for the attachement field but couldn't see them - could've been me being blind though 8)

Looks like the email business is server wide too as the external users are now reporting they aren't getting any from the forums either so that's good from my point of view as it's not my implementation of Hesk that's the issue :D

Cheers again - will be sorting with the boss some cash to go your way on the buy a beer front.
This message has been transmitted on 100% recycled electrons.
Post Reply