#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    San Antonio
    Posts
    4
    Rep Power
    0
    I am attempting to setup a file upload and I am getting an error message which is stumping me
    Here is the error message we get when we attempt to upload an image


    Warning: Unable to create '/home/jj/picparty.com/users/ss/tmp/phproJvoQ': No
    such file or directory in /home/jj/picparty.com/add.php3 on line 6
    failed to copy file
    upload report
    upload tmp file:
    file name:
    target file name:
    target directory: c:apachehtdocstmp
    file size:
    file type:

    Thanks for any feedback. I believe the problem is buried within our server.

    DD
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Location
    Seaside, CA
    Posts
    84
    Rep Power
    14
    Do you have "write" permissions set for that directory?

    ------------------
    From the day we're born, we're running out of time.
  4. #3
  5. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,640
    Rep Power
    4476
    Can you give some of you code that you're using to process the uploaded file?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    London/UK
    Posts
    91
    Rep Power
    14
    you might want to check php.ini
    there should be an entry there for the temporary location where php will upload

    from memory
    /tmp for *nix and c:tmp for win32

    otherwise, as the last guy said, submit a few of the lines of code

    p.s. I have some upload functions that I wrote, mail me offlist if you want them, it might help

    Bealers

    ------------------
    http://back-end.org
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    San Antonio
    Posts
    4
    Rep Power
    0
    upload_tmp_dir = /tmp in php.ini

    if(copy($picture, "./users/$name/$picture")){
    echo("First File Successfully copied<BR>");
    }else{
    echo("First File not copied<BR>");}

    That's the relevant function. $picture is the name of the file. The $name directory is successfully created by the script, set to 777, but then I get the error message listed above when the file tries to upload into that dir.

    Using PHP4...everything else works GREAT which is what's really annoying about the whole thing. If someone can give me a better way to upload files easily, I'd appreciate it.
  10. #6
  11. No Profile Picture
    freebsd
    Guest
    Devshed Newbie (0 - 499 posts)
    >>If someone can give me a better way to upload files easily

    Try Perl
  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    San Antonio
    Posts
    4
    Rep Power
    0
    Try Perl...how trite. Obviously if I was asking a question on in the PHP Forum, it implies that I wish for a solution involving PHP.

    Regardless, I figured it out. PHP assigns a variable $whatever_name automagically.
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    London/UK
    Posts
    91
    Rep Power
    14
    Try

    copy($picture, "/absolute_path/users/$name/$picture_name")
    file_name is a PHP thing that gives you the original filename of the file, I *think* that in your case, $picture evaluates to /tmp/the_tmp_file_name

    Bealers

    ------------------
    http://back-end.org

Similar Threads

  1. Problem web server access
    By caohocle in forum Networking Help
    Replies: 1
    Last Post: February 19th, 2004, 12:06 PM
  2. php support web server
    By poppy_123 in forum PHP Development
    Replies: 12
    Last Post: February 15th, 2004, 10:26 PM
  3. problem connecting to mysql server on the network
    By ash_freak in forum MySQL Help
    Replies: 3
    Last Post: February 9th, 2004, 04:29 PM
  4. XML DOM and PHP Problem, not displaying wanted info
    By drazhargraig in forum PHP Development
    Replies: 2
    Last Post: February 3rd, 2004, 03:14 PM
  5. fread problem: doesn t compile php code
    By ghorghor2002 in forum PHP Development
    Replies: 2
    Last Post: February 3rd, 2004, 05:25 AM

IMN logo majestic logo threadwatch logo seochat tools logo