This is my upload script... the post and get variables are passing fine in other scripts but then when i try to upload using this script.. it goes to google... with a search string of localhost..
Max Upload is set to 80MB in php.ini and i am trying to upload just 1 MB file.. also uploads have bee set on.. i m using PHP 4.2.2 and Apache 2.0.20 on RH9 system.. Also the apache server is running... sometimes upon pressing upload button, it does not go to goolge but gives a warning that maximum upload limit is breached but that is set to a much higher value!! please suggest Regards vishesh $action = $HTTP_POST_VARS["action"]; $max_size = "50000000"; // Max size in BYTES (1MB) $updir = "/var/www/html"; echo " $updir<br>$action<br> <b>Uploader</b><br> <form action='upl.php' method=post enctype='multipart/form-data'> File (max size: $max_size bytes/".($max_size/1024)." kb):<br> <!-- This is NOT a secure method of checking filesize, but it tells the user if he tried to upload a file too big before he waits for the huge file to upload, make sure to check the filesize after the form is sent as well --> <!-- <input type='hidden' name='MAX_FILE_SIZE' value='$max_size'> (removed because it wasn't working properly) --> <input type='file' name='filename'><br> <input type='hidden' name='action' value='upload'> <input type='submit' value='Upload File'> </form>"; if ($action == 'upload') { print "teri jai ho"; exit; if ($_FILES["filename"]["size"] > $max_size) die ("<b>File too big! Try again...</b>"); copy($_FILES["filename"]["tmp_name"],$updir.$_FILES["filename"]["name"]) or die("<b>Unknown error!</b>"); //copy($_FILES["filename"]["tmp_name"],"./".$_FILES["filename"]["name"]) or die("<b>Unknown error!</b>"); echo "<b>File Uploaded.</b>"; // for debug --> $filename --> ".$destination."/".$filename_name."</h2>"; } your only special contact on earth