Jump to content

tjobrien21

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

tjobrien21's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. The error is "There was an error uploading the file, please try again!".. Which technically would indicate a problem copying the file, though I can't see why (the smaller files work fine, and the disk isn't full). Here's the html form that submits the file: [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" type="text/css" href="../pk8.css"> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <title>Form Title</title> </head> <body>   <form enctype="multipart/form-data" action="ulf.php" method="POST">   <input type="hidden" name="MAX_FILE_SIZE" value="70000" />   Choose a file to upload: <input name="uploadedfile" type="file" /><br />   <input type="submit" value="Upload File" />   </form> </body> </html> [/code] And I see my own problem... And it's embarassing. However, I hate it when I google, see what I'm looking for in a forum, then someone just posts "I found and fixed the problem" and never posts the answer... So, for posterity, here goes: It's in the MAX_FILE_SIZE form element within the HTML. How embarassing. I cut and pasted an example form after my headers to get started, and when things went awry I never looked there - just at the PHP and server config (which I thought was correct, and it turns out, it is correct). I'm a putz  ::). Ok, maybe not a putz, but I can't believe I missed something so obvious. Thanks a bunch for pointing me in the right direction!! Tim
  2. Hi. :) I'm working on a file uploader, and for some reason it only works with very small files - 60K or so. A 300K file will fail. I googled and found all kinds of info about this happening with files over 2M, and having to make adjustments to php.ini... But this isn't anywhere near that limit, and when Googling I don't see others describing problems with files so small. Here's the upload script (once I can get it to function like I want, I have session control, security, etc to add): [code] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" type="text/css" href="../pk8.css"> <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"> <title>Site Title</title> </head> <html> <?php   $target_path = "/home/pk8/htdocs/downloads/";   $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);   if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {       echo "The file ".  basename( $_FILES['uploadedfile']['name']).       " has been uploaded.<br>";       if (chmod( $target_path , 0664 )) {         echo "Permissions set.<br>\n" ;       } else {         echo "Permission set <b>failed</b><br>\n" ;       }   } else {       echo "There was an error uploading the file, please try again!<br>";       echo "target path is $target_path .<br>\n" ;   } ?> ~ [/code] I can post php.ini or anything else that's needed. I'd appreciate any help that's available!! :) Thanks, Tim
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.