Jump to content

Problem Uploading Image Files to Windows Server, permission denied


TecTao

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.