Cannot move file to the attachments folder error

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
SEEKNDESTROY427
Posts: 12
Joined: Thu Dec 27, 2007 3:04 pm

Cannot move file to the attachments folder error

Post by SEEKNDESTROY427 »

Script URL: http://www.support.cp-autos.com/
Version of script: 0.94.1
Hosting company: hostforweb.com
URL of phpinfo.php: http://www.support.cp-autos.com/phpinfo.php
URL of session_test.php: http://www.support.cp-autos.com/session_test.php
What terms did you try when SEARCHING for a solution:
Cannot move file to the attachments folder, please check your server path settings
unable to upload bitmaps

Write your message below:
I'm not able to upload files that are 2.5MB or more. Anything around 2MB uploads without errors.

My upload settings are...
Number per post: 1
File size limit (Kb): 5120
Allowed file types: .bmp,.gif,.jpg,.jpeg,.zip,.doc,.txt,.pdf
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

As mentioned in the readme.htm there are a number of server-side settings that affect file uploads. On your server maximum allowed file size is 2Mb because upload_max_filesize is set to 2M in the php configuration.

You can try creating a plain text file named "htaccess.txt" in your hesk folder and enter this inside to increase upload size to 5Mb:

Code: Select all

php_value upload_max_filesize 5M
php_value post_max_size 25M
Then rename the file on the server from "htaccess.txt" to ".htaccess" (note the dot before the name) and see if that helps. If http://www.support.cp-autos.com/phpinfo.php shows 5M for upload_max_filesize under "Local value" then it worked. If not you will have to ask your host to increase your max file upload size.
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
SEEKNDESTROY427
Posts: 12
Joined: Thu Dec 27, 2007 3:04 pm

Post by SEEKNDESTROY427 »

Thank you for your quick reply, Klemen.

I can now upload files up to 5MB. :D

I'm going to purchase a copyright removal license for this great script. Well worth the money!

Have a great weekend.
ictconsulting
Posts: 21
Joined: Sun Feb 01, 2009 2:21 pm

can't attach files, no matter the size "cannot move fil

Post by ictconsulting »

I tryed many time to attach a file to a ticke but I always got the following message.
"Error cannot move file to the attachments folder, please check your server path settings"
I checked my provider phpinfo settings (hosted service..) and find out that the upload_max_filesize is 25Mb. What should I also check to get this working.
Simple text mails (no attachments) doesn't have problem...

Any idea?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Either your server has file uploads disabled, the attachments folder is not really writable or the System/root path: is wrong in settings. Check all these things.
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
shifuimam
Posts: 2
Joined: Wed Mar 18, 2009 2:06 am

Post by shifuimam »

I've made sure that permissions are set properly on the upload directory, but it's not working in XP x64 on Apache (we're moving to IIS eventually but haven't gotten that far yet).

What permissions is hesk looking for when running on a Windows server?
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hesk doesn't require any special permissions - PHP scripts on general must be able to write to the attachments folder.
Since this isn't a Hesk specific problem but a PHP setup one try setting permissions like this
viewtopic.php?t=1406
or if this doesn't work search Google for help:
http://www.google.com/search?q=php+wind ... r+writable

Having a 64-bit operating system doesn't make any difference; it's working fine on my x64 Vista.

Also double-check your path set in admin panel > Settings under "System/root path:". Windows usually requires two backslashes in paths, like
C:\\path\\to\\hesk

And per instructions don't add a trailing (double) backslash.
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
burtcampbell
Posts: 3
Joined: Sat Mar 21, 2009 5:42 pm

Post by burtcampbell »

Klemen,

You should consider adding info about the 2MB limit in more places. I spent an hour reading countless posts until I found this one about creating the .htaccess file to modify the php limits. Everywhere else only talks about the path and the permissions. I would expect that many people have this 2MB limit and most files are greater than 2MB.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Although this is more of a PHP configuration thing (it is mentioned in the readme file) I get your point and will add more explanation to the readme. Thanks for the feedback.
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
Post Reply