Page 1 of 1
File Attachment Issue (Not a Permissions Issue)
Posted: Thu Mar 08, 2012 6:09 am
by Craig_TajEmo
Hi All, done some searching for this and can't find anything, leads me to believe I have done something wrong.
When adding a message while file attachements are enabled, it is forcing attachments, if I leave it blank then I get an error "Invalid File Type" this is especially a problem in the help desk editor, as I cannot disable attachments.
Is there a way to post support tickets and knowledge base items with the attachments as optional ?
some info on setup :
Server = WAMP
OS = Windows 7 Ulitimate 32bit
running on localhost
PHP Version 5.3.8
MySQL version : 5.5.16
Apache Version : 2.2.21
Hesk Version : 2.3
Thanks in advance
Craig
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Thu Mar 08, 2012 7:19 pm
by Klemen
File attachments are not required for KB articles - your problem is originating somewhere else, what you are getting is not how the code should react. Whether it's browser or server setup issue I am not sure.
Have you been modifying any files?
Can you try with disabling browser add-ons/plugins?
Can you try with a different browser?
Can you try on a different computer (I know it's localhost, but still...)?
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Thu Mar 22, 2012 1:12 pm
by T50user
I'm having the same problem when trying to add KB articles (invalid file type). The only way I can get an article added is to have 3 attachments.
I have tried IE, Chrome and Firefox on both Win 7 32bit and Win XP, all respond the same way.
The same problem occurs when trying to submit a new ticket, if no attachment is added.
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Thu Mar 22, 2012 3:57 pm
by Klemen
Could you upload phpinfo file from here to your help desk folder and post a link to it so I can see your PHP configuration?
http://www.phpjunkyard.com/extras/phpinfo.zip
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Fri Mar 23, 2012 8:38 am
by T50user
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Fri Mar 23, 2012 4:36 pm
by Klemen
Looks like your server is inserting some bytes somewhere, because when an empty field is submitted it actually contains some extra bytes instead of being empty.
Have you been editing any files? Perhaps opening them and saving in utf-8?
Are you having problems with the anti-SPAM image as well?
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Fri Mar 23, 2012 4:49 pm
by T50user
I don't believe I have editded any files except web.config and I'm not using the anti spam image.
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Fri Mar 23, 2012 5:11 pm
by T50user
I have just switched on the anti spam image and that works fine.
But I had to attach a file to submit a ticket. When looking at the submitted ticket I noticed that it had dropped the 1st character of the filename of the attachment.
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Fri Mar 23, 2012 5:37 pm
by Klemen
Could you let me know what exactly the top of the page says if you add
just below
in file "submit_ticket.php" and try to submit a ticket as a customer?
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Mon Mar 26, 2012 7:46 am
by T50user
This is the result of the test. The attached file's name is "successIcon.gif"
Array ( [attachment] => Array ( [name] => Array ( [1] => uccessIcon.gif ) [type] => Array ( [1] => image/gif ) [tmp_name] => Array ( [1] => D:\OSticket\phpD267.tmp ) [error] => Array ( [1] => 0 ) [size] => Array ( [1] => 1137 ) ) )
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Mon Mar 26, 2012 2:09 pm
by Klemen
Actually I was wondering what does it say if you attach no files. Sorry for not being clear enough.
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Mon Mar 26, 2012 2:17 pm
by T50user
It doesn't say anything as I just get the Invalid file type (ú=) error
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Mon Mar 26, 2012 6:12 pm
by Klemen
That's exactly the problem - your server is adding the ú= and I have no idea why.
I would try downloading original Hesk files again and uploading them all (except hesk_settings-inc.php) to the server again without opening/modifying them.
Re: File Attachment Issue (Not a Permissions Issue)
Posted: Wed Apr 04, 2012 8:24 am
by T50user
I completely reinstalled the system and it now works as expected. Thanks for your help.