Upload file not working
Results 1 to 4 of 4

Thread: Upload file not working

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    8

    Upload file not working

    Hi,

    I have created a simple script to upload file. It's not working. Shows error code 7.

    I am running the script on CentOS. I have given full permissions (777) on upload temporary, final folders, even on the script file.

    Temporary upload folder set through php.ini

    Script has all required parameters like enctype="multipart/form-data" etc.

    Please help.

    Thanks,
    Sandeep

  2. #2
    Code Monkey
    Join Date
    Oct 2002
    Location
    Delaware
    Posts
    308
    Error code 7 is UPLOAD_ERR_CANT_WRITE:

    Value: 7; Failed to write file to disk.

    If you've given 777 permissions, you may want to add some debug statements to your file manipulation code to make sure you're not running into relative file location issues.
    Lackey @ Large

  3. #3
    Pna lbh ernq guvf¿
    Join Date
    Jul 2004
    Location
    Kansas City area
    Posts
    19,353
    Quote Originally Posted by Wynder View Post
    If you've given 777 permissions, you may want to add some debug statements to your file manipulation code to make sure you're not running into relative file location issues.
    None of the "file manipulation code" is relevant - if you're getting error 7, it means PHP couldn't write to the upload directory before it ever started executing any of your script.

    @sandeept: I'm wondering if the 0777 (not to be confused with 777 decimals ) permissions were given on the directory that PHP is attempting to use. Have you done a phpinfo() to confirm that this directory is indeed where you expect it to be?

  4. #4
    Junior Member
    Join Date
    Sep 2008
    Posts
    8
    Thanks for the response.

    Yes, I have checked phpinfo and I have given 777 permissions on respeective directory. But, I am wondering if this issue is related to CentOS or AWS (Amazon cloud services). I have set up websites earlier on different hosting service like GoDaddy, DailyRazor etc. But, I never faced such issue.

    Thanks,
    Sandeep

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •