move_uploaded_file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris

    #1

    move_uploaded_file

    We would like to utlize the Move_Upload_Fil e to get a file to another
    web server. We are currently using Windows Server 2003 with PHP on
    them. However I am sure I have a file permission issue on the
    targetted server box (since its going from one box to another), but I
    am not sure how to force PHP to use a specific user (since its a subset
    of IIS, it almost looks like it uses Anonymous - which will not work
    for the scenerio I am looking at that I am aware of).

    Any Help would be appreciated - here is a snipet of our code:

    move_uploaded_f ile($_FILES['upload']['tmp_name'],"\\server2\sha re\directory\$f ilename")

  • fletch

    #2
    Re: move_uploaded_f ile

    php should be doing this as the user the script is run as, which is not
    so easy. passthru('whoam i') would tell you on linux, no idea on win*
    sorry. On linux there are various commands that will let you run a
    program as a certain user which would take the php command as an
    argument, I don't do windows.

    I suppose I would do an fopen() on the server and try and get some info
    on permissions from that.

    good luck

    Comment

    Working...