Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Ok, I'm posting this here because the support at my host is so slow, it takes 15 minutes for a question to be even responded to.

    See, I'm using XAMPP with all its standard stuff. I figured I could use this as a base for wherever I plan to use my work, and everything goes well. Including my upload script, which is based off the one provided in PHP.net. It works great on my computer and also on another host.

    Then I uploaded my script to this host's server... and it told me that permission was denied while trying to execute move_uploaded_file. I suppose this has to be something with the server's configuration. I'm not sure what I'm supposed to do, I'm crap at this stuff. Can someone help?
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Can post the error it spits out?

  4. #3
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    Something about "unable to open stream: permission denied". The support team says it may have to do with "the user used to access the server". Apparently they said the default user is unable to "modify files on the root directory". The thing is, I'm obviously not moving files to the root directory. What kind of "user" are they talking about here?
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.

  5. #4
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    What exact path did you pass into the move_uploaded_file function as the destination?
    choosy developers choose gif!
    website | paintings | blog

  6. #5
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    There are two real options. First is if the user has no permissions to the /tmp directory. That's a problem you can't fix. The other possibility is that the user doesn't have access to the directory you're trying to move to. Typically Apache won't necessarily run as your user, but rather as a separate user, maybe [minicode]apache[/minicode]. If you can find out what group that user's in, you can use [minicode]chown[/minicode] to change the relevant directory to belong to that group, and then [minicode]chmod g+w[/minicode] the directory to allow that group to write to it.

  7. #6
    Senior Member Steax's Avatar
    Join Date
    Dec 2006
    Location
    Bandung, Indonesia
    Posts
    1,207
    Member #
    14572
    It was a totally normal move, that only doesn't work on this host. The support team says they'll get it done for me today. We'll see. I do wish I knew what the problem is in case I encounter it again one day...
    Note on code: If I give code, please note that it is simply sample code to demonstrate an effect. It is not meant to be used as-is; that is the programmer's job. I am not responsible to give you support or be held liable for anything that happens when using my code.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 09:41 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com