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
// copy the file, making the destination directory if necessary
$filedir = 'C:/My_Workspace/ojs2002/'.basename($_FILES['articlefile']['name']);
chmod($_FILES["articlefile"]["tmp_name"], 0777);
chmod($filedir, 0777 );
move_uploaded_file($_FILES["articlefile"]["tmp_name"],$filedir);
The code would work fine on Linux servers but not on Windows.
Any help would be very much appreciated. Thank You.