Jump to content

Problem Uploading Image Files to Windows Server, permission denied


Recommended Posts

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

Edit: misread the title.  :shrug:

 

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.

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.