Can't Include File Attachments in Tickets

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
jvarela
Posts: 3
Joined: Tue Jan 14, 2014 8:21 pm

Can't Include File Attachments in Tickets

Post by jvarela »

Script URL: http://soporte.desisasoft.com/
Version of script: 2.5.2
Hosting company: 1&1 - http://www.1and1.com
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: File Attachments

I recently installed version 2.5.2 in my Windows hosting service with 1&1 and I'm having trouble attaching files to the support tickets. When trying to submit a ticket with attachments I get the "Cannot move file to the attachments folder" error. This is the status reported when entering the Settings option:

HESK version: 2.5.2 - Check for updates
PHP version: 5.3.5 (MySQL)
MySQL version: 5.1.72-log
/hesk_settings.inc.php Exists, Writable
/attachments Exists, Writable

I've followed the steps indicated in the "File attachments not working - READ THIS!" post that is also available in the Hesk Knowledge Base and I need help identifying exactly where it is that I need to enter the path that is obtained by using the path.php script. This is the only thing I've yet to try.

When running the path.php script I get the following:

Use this path: E:\kunden\homepages\6\d250511792\www\SOPORTE

The thing is that I honestly can't identify exactly where within the Hesk Setting is it that I need to enter this path. Could you please confirm this.

I've been in touch with my hosting provider and they have not indicated that there is a restriction for uploading files. None the less, I also activated the debug mode and I get the following warnings in the status section:

HESK version: 2.5.2
Warning: file_get_contents() [function.file-get-contents]: http:// wrapper is disabled in the server configuration by allow_url_fopen=0 in E:\kunden\homepages\6\d250511792\www\SOPORTE\admin\admin_settings.php on line 1810

Warning: file_get_contents(http://heskcom.s3.amazonaws.com/hesk_version.txt) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in E:\kunden\homepages\6\d250511792\www\SOPORTE\admin\admin_settings.php on line 1810
- Check for updates

I'd appreciate any help. Thanks.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Can't Include File Attachments in Tickets

Post by Klemen »

The steps in the post are for HESK prior to 2.5.2, sorry for not making that clear (I added a note now). HESK 2.5.2 doesn't use the path variable anymore so you indeed have nowhere to add that path to the settings.

Back to your problem - the error you are getting means PHP cannot move the uploaded file from server's temporary folder to your HESK "attachments" folder.

One of the below reason is responsible for this:

- the file is not located in the server's temporary folder (server configuration issue)

or

- PHP doesn't have permission to move the file from server's temporary to "attachments" folder (permissions issue)

You can try uploading this attachments.inc.php file to your HESK "inc" folder and see if you get any other error messages and/or warnings:
http://www.hesk.com/extras/attachments_debug.zip


The "file_get_contents" warnings are there because your host has some PHP functionality disabled. HESK will still work with that function disabled, but will not be able to checks for updates automatically (you can turn that off in Settings > Misc).



P.s.: your host is using an old PHP version (from January 2011) with known bugs and security issues! I would ask your host to update PHP to the latest version or start looking for a different one.
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
jvarela
Posts: 3
Joined: Tue Jan 14, 2014 8:21 pm

Re: Can't Include File Attachments in Tickets

Post by jvarela »

Thanks a lot for the input. I uploaded the attachments.inc.php file and now when trying to submit a ticket with an attachment I get the following error:

"File upload failed, try with a smaller or no file attachment."

The file size is no issue since I have a 8Mb limit and the file used for the test is way smaller. I'm still pressing my hosting provider to double verify if they don't have any restrictions in the configuration. I will touch base with them using the information in your reply. Maybe that will help.

Thanks.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: Can't Include File Attachments in Tickets

Post by Klemen »

The error you see just confirms it: files aren't being uploaded to the temporary folder at all or PHP doesn't have permission to access them (open_basedir restriction in effect perhaps?).

It is definitely something the host must fix because both these things are independent of code.
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
jvarela
Posts: 3
Joined: Tue Jan 14, 2014 8:21 pm

Re: Can't Include File Attachments in Tickets

Post by jvarela »

Confirmed. After questioning my hosting provider they have admitted that they do not support file uploads with PHP, since it is running in a Windows server. I will be opening a Linux account in order to resolve the problem. Thanks for the help.
Post Reply