+ Reply to Thread
Results 1 to 5 of 5

Thread: Not able to upload

  1. #1
    kashiqirphan88 is offline x10Hosting Member kashiqirphan88 is an unknown quantity at this point
    Join Date
    Oct 2010
    Posts
    4

    Question Not able to upload

    I tried to upload a file via a php code but I get this error

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, no-reply@x10hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    The code I used was
    <?php
    if ($_FILES["file"]["error"] > 0)
    {
    echo "Error: " . $_FILES["file"]["error"] . "<br />";
    }
    else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br />";
    echo "Type: " . $_FILES["file"]["type"] . "<br />";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
    echo "Stored in: " . $_FILES["file"]["tmp_name"];
    }
    ?>

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: Not able to upload

    Make sure the permissions on the script are 0644
    Nothing is always absolutely so.

  3. #3
    hazar90's Avatar
    hazar90 is offline x10Hosting Member hazar90 is an unknown quantity at this point
    Join Date
    Nov 2010
    Location
    Serbia
    Posts
    37

    Re: Not able to upload

    Permissions on that script must be 0644

  4. #4
    kashiqirphan88 is offline x10Hosting Member kashiqirphan88 is an unknown quantity at this point
    Join Date
    Oct 2010
    Posts
    4

    Question Re: Not able to upload

    Thank you guys now am able to upload a file but still am not able to find where the uploaded files get stored

  5. #5
    lemon-tree's Avatar
    lemon-tree is offline x10 Minion lemon-tree has a spectacular aura about
    Join Date
    Nov 2007
    Posts
    1,420

    Re: Not able to upload

    The files will be stored in the directory and file name that $_FILES["file"]["tmp_name"] specifies; this is a temporary directory, meaning the files will not be retained once the script has terminated. To have the files in a certain folder, you need to copy the file yourself within the script.

+ Reply to Thread

Similar Threads

  1. i can't upload PHP files when i upload it it stoped
    By fthforum in forum Free Hosting
    Replies: 11
    Last Post: 06-04-2010, 05:25 PM
  2. Replies: 6
    Last Post: 01-29-2010, 12:11 PM
  3. Replies: 2
    Last Post: 11-01-2008, 09:48 PM
  4. can't upload to ftp
    By koopa in forum Free Hosting
    Replies: 1
    Last Post: 09-26-2008, 07:16 PM
  5. ftp upload
    By TheFilth in forum Free Hosting
    Replies: 2
    Last Post: 02-24-2008, 08:02 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers