By stone_d on
Hi guys,
suddenly i get this error message when tryin to upload images in my content-type. I havent changed anything on the config, but i dunno if my provider did change something.
* warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpds35Kj' to 'sites/default/files/498_0.jpg' in /homepages/35/d33505019/htdocs/bettinascheibe/drupal/includes/file.inc on line 572.
* File upload error. Could not move uploaded file.
Any ideas on this?
Thanks in advance
stone
Comments
I would check the PHP error
I would check the PHP error log, if you can, to determine the exact error and I would ask your provider if he can check the directory permissions. Or if you know how, check them yourself. :)
But if you changed nothing, then ask your host.
Drupal first uploads a file
Drupal first uploads a file into the /tmp directory of the webserver, and once that succeeded, to it's final destination (by default .../sites/default/files relative to the installation root directory of your Drupal installation). The error message tells you that the second step failed. Maybe the target directory (sites/default/files) doesn't exist, or the web server does not have write privileges in that directory - which it obviously needs.
So I would check the permissions on the files directory and make sure that they are writeable.
More on this
To add to this, if your error is the same as mine, the file has been moved into the final directory.
On one of my sites, I change the tmp directory to temp and it fixed the problem for audio, but video is broken on both sites.