Log in

View Full Version : Using PHP move_uploaded_file function permission denied



awakener1986
07-05-2012, 02:27 PM
Hi

I've been stuck on this code for days as I am hitting this error when I upload a file to the server. Its a windows server running on Apache

Tried various solutions but still receiving the error. I tried changing full permissions to everyone on that server.

I changed the default PHP upload tmp file to inside my application yet I am still having this error.

Warning: move_uploaded_file(C:\My_Workspace\ojs2002) [function.move-uploaded-file]: failed to open stream: Permission denied in C:\My_Workspace\ojs\admin\include\fileupload.php on line 78

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\My_Workspace\ojs\tmp\phpCB78.tmp' to 'C:\My_Workspace\ojs2002' in C:\My_Workspace\ojs\admin\include\fileupload.php on line 78

:confused::confused::confused:

Any help would be very much appreciated. Thank You.

Nile
07-05-2012, 09:42 PM
Are permissions set to 777? Also try it with chmod()

awakener1986
07-07-2012, 01:45 AM
yea tried that already no luck :(

Nile
07-07-2012, 04:23 PM
Check to see if there's anything in php.ini that would deny access to something like this.

CoursesWeb
07-08-2012, 12:41 PM
Hi
If the script is on your computer (localhost), maybe the Apache, PHP settings are the problem. Try use XAMPP, or WampServer.