rosebudthegreat Posted January 8, 2013 Share Posted January 8, 2013 I'm not sure if this is the right place to put this query, but I have an issue in XAMPP under Windows. I have defined HOST_WWW_ROOT in the app_config.php file as my "/htdocs/" folder and then I have defined the upload directory as HOST_WWW_ROOT . "training/uploads/pics/" and when I try to use my webform to upload, I get the following error message permissions or related error moving file to /htdocs/training/uploads/pics/imagename.JPG. With a little messing around I have been able to set the HOST_WWW_ROOT as "/XAMPP/" and then defined the upload directory as HOST_WWW_ROOT . "uploads/pics/" and the code then works fine. The problem being that for training purposes I can't access the files through the browser if I upload them to that location. Can anyone help advise me where I've gone wrong with this and where I can change the folder permissions for htdocs so that I can use the original specified location to upload my webform pics too. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/272840-xampp-folder-permission-issues-when-trying-to-upload/ Share on other sites More sharing options...
Muddy_Funster Posted January 8, 2013 Share Posted January 8, 2013 folder permissions would be set in the operating system, which with xamppp will either be windows or MacOS. For windows right click on the folder that you want to upload to and, assuming you are an admin level user, choose properties from the context menu. From here click on the security tab and then click on the advanced button followed by the Change Permissions Button and then the Add Button. In the large box in the bottom half od the prompt that comes up (should be the default focus for the cursor) type the word Everyone and click OK. Put a tick in the left hand Full Control checkbox in the list that comes up (headed Allow) and click OK. Now OK/Apply/Finish back to the explorer and your folder is now open to Everyone. Quote Link to comment https://forums.phpfreaks.com/topic/272840-xampp-folder-permission-issues-when-trying-to-upload/#findComment-1404147 Share on other sites More sharing options...
Christian F. Posted January 8, 2013 Share Posted January 8, 2013 What I notice is that you said the path was set to /htdocs, not ~/htdocs or something like that. If that is indeed the case, then that is your problem: You're trying to add files to a folder on the root of your file system, a folder I'm pretty sure does not exist. Remember, your home folder is not your system's root folder. Quote Link to comment https://forums.phpfreaks.com/topic/272840-xampp-folder-permission-issues-when-trying-to-upload/#findComment-1404153 Share on other sites More sharing options...
rosebudthegreat Posted January 8, 2013 Author Share Posted January 8, 2013 Thanks both for those replies. I have set permissions to EVERYONE but that hasn't negated the error and I've tried changing the root folder to everything I can think of, but while I am trying to upload files to a location within the htdocs folder, I am getting the error message mentioned earlier. As I said, if I place the HOST_WWW_ROOT as xampp and then create uploads/pics/ (making the path /XAMPP/uploads/pics/ then it works fine, but i can't retrieve it using the path. I assume it must be a setting within PHP and xampp but I have no idea where I would look for it to change the permissions. Quote Link to comment https://forums.phpfreaks.com/topic/272840-xampp-folder-permission-issues-when-trying-to-upload/#findComment-1404173 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.