Results 1 to 5 of 5

Thread: Using PHP move_uploaded_file function permission denied

  1. #1
    Join Date
    Jan 2010
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Using PHP move_uploaded_file function permission denied

    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



    Any help would be very much appreciated. Thank You.

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Are permissions set to 777? Also try it with chmod()

  3. #3
    Join Date
    Jan 2010
    Posts
    13
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    yea tried that already no luck

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Check to see if there's anything in php.ini that would deny access to something like this.

  5. #5
    Join Date
    Jun 2012
    Posts
    12
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Hi
    If the script is on your computer (localhost), maybe the Apache, PHP settings are the problem. Try use XAMPP, or WampServer.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •