File Attachment Issue (Not a Permissions Issue)

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
Craig_TajEmo
Posts: 1
Joined: Thu Mar 08, 2012 6:02 am

File Attachment Issue (Not a Permissions Issue)

Post 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
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post 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...)?
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
T50user
Posts: 10
Joined: Fri Nov 04, 2011 3:53 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post 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.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post 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
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
T50user
Posts: 10
Joined: Fri Nov 04, 2011 3:53 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post by T50user »

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

Re: File Attachment Issue (Not a Permissions Issue)

Post 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?
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
T50user
Posts: 10
Joined: Fri Nov 04, 2011 3:53 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post by T50user »

I don't believe I have editded any files except web.config and I'm not using the anti spam image.
T50user
Posts: 10
Joined: Fri Nov 04, 2011 3:53 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post 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.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post by Klemen »

Could you let me know what exactly the top of the page says if you add

Code: Select all

print_r($_FILES);
just below

Code: Select all

hesk_dbConnect();
in file "submit_ticket.php" and try to submit a ticket as a customer?
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
T50user
Posts: 10
Joined: Fri Nov 04, 2011 3:53 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post 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 ) ) )
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post by Klemen »

Actually I was wondering what does it say if you attach no files. Sorry for not being clear enough.
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
T50user
Posts: 10
Joined: Fri Nov 04, 2011 3:53 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post by T50user »

It doesn't say anything as I just get the Invalid file type (ú=) error
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post 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.
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
T50user
Posts: 10
Joined: Fri Nov 04, 2011 3:53 pm

Re: File Attachment Issue (Not a Permissions Issue)

Post by T50user »

I completely reinstalled the system and it now works as expected. Thanks for your help.
Post Reply