TecTao Posted June 27, 2011 Share Posted June 27, 2011 My client has their site residing at Godaddy and on a windows server. The CMS is with mysql and all works fine, except the uploading of images. Because it's running on Windows, I can't edit the permissions to write and execute, so temp files can't be moved to the image directory. Here are the errors: Warning: move_uploaded_file(mfg_logos/lithoniaCopy.gif) [function.move-uploaded-file]: failed to open stream: Permission denied in D:\Hosting\5889951\html\adm\mfg_logo_add_submitted.php on line 20 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'D:\Temp\php\phpD2D8.tmp' to 'mfg_logos/lithoniaCopy.gif' in D:\Hosting\5889951\html\adm\mfg_logo_add_submitted.php on line 20 Any suggestions? Thanks for any help in advance. Mike Quote Link to comment https://forums.phpfreaks.com/topic/240551-problem-uploading-image-files-to-windows-server-permission-denied/ Share on other sites More sharing options...
fugix Posted June 27, 2011 Share Posted June 27, 2011 Edit: misread the title. Found this piece from php.net Andrey P. 01-Mar-2011 03:23 I was trying to change permissions of a folder with chmod command with FTP connection. (I needed a writable folder to upload pictures with php) I got the following respond: "SITE CHMOD 777 uploads: command not understood" The reason: Server is running under Windows system that does not allow to set file permissions via FTP. Conversely, the UNIX-running servers allow that. Solutions: 1. If your web hosting provider has a web-based control panel that lets you set file permissions, then you need to login there and make changes. 2. It is possible to contact the hosting provider and ask them about this issue; maybe they can make the changes. 3. It is possible to change the hosting provider that has servers run on UNIX, and keep the site there. Quote Link to comment https://forums.phpfreaks.com/topic/240551-problem-uploading-image-files-to-windows-server-permission-denied/#findComment-1235599 Share on other sites More sharing options...
mikosiko Posted June 27, 2011 Share Posted June 27, 2011 have you already tried using chmod() on the directory(s)? In windows? Quote Link to comment https://forums.phpfreaks.com/topic/240551-problem-uploading-image-files-to-windows-server-permission-denied/#findComment-1235602 Share on other sites More sharing options...
TecTao Posted June 27, 2011 Author Share Posted June 27, 2011 Thanks for the feedback. I've talked to the godaddy hosting tech people, and permissions can't be changed as with unix chmod. Wondered if anyone else had run into this problem with mysql and php on windows and how they solved it. thanks, m Quote Link to comment https://forums.phpfreaks.com/topic/240551-problem-uploading-image-files-to-windows-server-permission-denied/#findComment-1235621 Share on other sites More sharing options...
fugix Posted June 27, 2011 Share Posted June 27, 2011 have you read my edited post? Quote Link to comment https://forums.phpfreaks.com/topic/240551-problem-uploading-image-files-to-windows-server-permission-denied/#findComment-1235628 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.