Menu

Help can't get uploads to work

Help
mswlogo
2007-01-12
2012-10-11
  • mswlogo

    mswlogo - 2007-01-12

    Here is the error message. I think the message might be missing a slash before the file name.

    I've tried setting protection on the upload directory to 777 and still get the error.

    What am I doing wrong?

    PHP Warning
    lib/plugin/UpLoad.php (In template 'body' < 'html'):161: Warning[2]: move_uploaded_file(/hsphere/local/home/myname/mywebsite.com/wiki/uploadsmeridian-logo.gif): failed to open stream: Permission denied (...repeated 2 times)

     
    • mswlogo

      mswlogo - 2007-01-13

      I got this to work by a hack to one of the scripts but I don't understand why this hack was needed

      In upload.php I changed:
      elseif (move_uploaded_file($userfile_tmpname, $file_dir . $userfile_name) or
      (IsWindows() and rename($userfile_tmpname, $file_dir . $userfile_name))
      )
      To:
      elseif (move_uploaded_file($userfile_tmpname, "$file_dir/$userfile_name") or
      (IsWindows() and rename($userfile_tmpname, $file_dir . $userfile_name))
      )

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.