Sylvio Posted August 16, 2011 Share Posted August 16, 2011 Hi, So I am facing this issue, I just moved my clients website on to his (pre-live) hosting but I'm having issues uploading images and files, actually any upload thru processwire admin fails (http upload). I am getting this error: Unable to move uploaded file to: /var/www/vhosts/showled.tv/httpdocs/site/assets/files/5874/20110707_164442-1.jpg The hosting is a linux server with a Plesk system, and I think the problem is that every upload thru http is done by the user apache:apache, and there lies the problem! This is pretty urgent, the client started to add content, but he is not able to upload his images, etc... Is there anybody who can help me this issue? Regards, Sylvio Link to comment Share on other sites More sharing options...
apeisa Posted August 16, 2011 Share Posted August 16, 2011 Files are written to /site/assets/files/ so make sure you have given write permissions there (0777 if using (s)ftp or chmod ugo+rw if using shell). Link to comment Share on other sites More sharing options...
Sylvio Posted August 16, 2011 Author Share Posted August 16, 2011 All write permissions are correct 777 to /site/assets/files/, a temp directory is created, for instance '5874', with 777 permissions, BUT the file is not moved to this location. Link to comment Share on other sites More sharing options...
ryan Posted August 16, 2011 Share Posted August 16, 2011 This command from the shell should fix it: chmod -R ugo+rw site/assets Type that from your web root dir. Link to comment Share on other sites More sharing options...
ryan Posted August 16, 2011 Share Posted August 16, 2011 5874 is not a temp dir. That page id numbered dir is created for every page as its place to store files. Running as apache:apache is totally normal, just have to figure out where the file system is blocking write access to apache. Could also be that one of the parent dirs needs +x. Link to comment Share on other sites More sharing options...
Sylvio Posted August 16, 2011 Author Share Posted August 16, 2011 Ryan, That command did not solve my issue. Sylvio Link to comment Share on other sites More sharing options...
Sylvio Posted August 16, 2011 Author Share Posted August 16, 2011 Could the issue be that PHP safe_mode is on? Link to comment Share on other sites More sharing options...
ryan Posted August 16, 2011 Share Posted August 16, 2011 That could definIty be an issue. I recommend disabling that first thing. Also, another good way to identify problems is to install a fresh copy of PW through the installer. Link to comment Share on other sites More sharing options...
ryan Posted August 16, 2011 Share Posted August 16, 2011 Try adding this to the top of your .htaccess: php_value upload_tmp_dir /path/to/root/site/assets/cache/ Of course replace with the actual path to site/assets/cache/. This may allow you to work around safe mode. Link to comment Share on other sites More sharing options...
Sylvio Posted August 16, 2011 Author Share Posted August 16, 2011 Turning safe_mode off solved my issue!! I will also try the 'upload_tmp_dir' directive change instead Thanks for all your help, my client thanks you Cheers Sylvio Link to comment Share on other sites More sharing options...
ryan Posted August 16, 2011 Share Posted August 16, 2011 Glad that worked. If you can , keep it turned off. I was only suggesting to change the upload dir if you couldnt turn off safe mode. There is a reason why PHP 6 doesn't even have safe mode, it's generally a bad thing when you are trying to run any kind of web application. I don't know of any web hosting providers using safe mode. Link to comment Share on other sites More sharing options...
Sylvio Posted August 16, 2011 Author Share Posted August 16, 2011 I thought that the client had disabled it, they have like a full admin plesk hosting where the provider doesn't configure anything, so I guess the client missed this setting Link to comment Share on other sites More sharing options...
beto Posted April 26, 2012 Share Posted April 26, 2012 Hello, I am new to this intriguing dimension called ProcessWire. I am doing my first steps, but I also get this message: Unable to move uploaded file to: /var/www/vhosts/showled.tv/httpdocs/site/assets/files/5874/20110707_164442-1.jpg I am running the site in Windows-Apache-PHP5.3 Any help? 1 Link to comment Share on other sites More sharing options...
formmailer Posted April 26, 2012 Share Posted April 26, 2012 Hi, Did you check the permissions on the assets folder? I am not so familiar with Apache on Windows, but assume that the service account running Apache needs write permission to the assets folder, as well as to it's subfolders. /Jasper 1 Link to comment Share on other sites More sharing options...
ryan Posted April 26, 2012 Share Posted April 26, 2012 Jasper is right: it sounds like PHP/Apache doesn't have write access in your /site/assets/ dir. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now