1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server Issue File uploading & open_basedir

Discussion in 'Resolved Bug Reports' started by rour, Apr 20, 2014.

  1. rour

    rour Member

    Please use is_uploaded_file, move_uploaded_file functions for correctly working with open_basedir restrictions
  2. Sheratan

    Sheratan Well-Known Member

    I don't think this is a xenforo bug.

    Check your open_basedir value, your forum root directory should been there.
  3. Chris D

    Chris D XenForo Developer Staff Member

    XenForo already uses those functions, so, like Sheratan, I believe you have some other issue.
  4. rour

    rour Member

    a bug there.
    Problem was resolved after editing open_basedir.
  5. Mike

    Mike XenForo Developer Staff Member

    We do use those functions, but we still need to read the file in various cases. We could look to move the file to a temporary location, but that's likely a waste of time in 99.9% of cases (especially if the temp folder is on a different partition and the data has to be copied over) and creates greater possibility for orphaned temporary data.

    If your upload temp directory is outside your open_basedir, it's usually a best practice in general to move it (or to expand open_basedir to allow access to the temp dir).

Share This Page