Re: Upload file - $HTTP_POST_FILES empty (thinking in harakiri)

From: Date: Sat, 24 Aug 2002 10:20:03 +0000
Subject: Re: Upload file - $HTTP_POST_FILES empty (thinking in harakiri)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-113948@lists.php.net to get a copy of this message
Hi Zeev, Yesterday and today (early in the morning), I have Investigated about this issue. In the beginning of my search I found this posted: http://groups.google.com/groups?q=%2Bmiguel+%2Bphp+%2Bmultipart/form-data&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=B8B6599D.A88%25mnc%40stoic.net&rnum=3 from Miguel Cruz. Honestly I didn't give its a lot of importance but it was giving turns in my head. In mi work we have enough, with more an less capacity (all x86 / RH 7.3 /PHP 4.1.2/Apache 1.3.23). All my tests I was making them in our "big ones" servers, so this morning I decided try my script in one of the "small ones" -> Result!.. RUN PERFECTLY. Apparently both servers have identical configuration, with one _little_ details : the small server don't pass across firewall. Yeah, apparently @ Edwin is right. It is a first presumption in my investigation, but of course if you or other person in this list have more information about this, I will appreciate a lot. --Juan_Pablo At 06:18 24-08-2002 +0300, Zeev Suraski wrote:
What is your upload directory? What platform is it? Did you try taking a look at the Apache error log? Zeev At 17:05 23/08/2002, Juan Pablo Aqueveque wrote:
Hi guys!.. i'm really grief-stricken. I had spend all the morning looking for solution to my problem, PLEASE.. Could somebody help me? ' -(. I tried the example from http://www.php.net/manual/en/features.file-upload.php but i get the message "Possible file upload attack", I notice that this message is because $HTTP_POST_FILES was absolutely empty.. BUT i don't know WHY is empty!!!!!!! - My form.php file are: <form enctype="multipart/form-data" action="upload.php" method="post"> <input type="hidden" name="MAX_FILE_SIZE" value="2000000"> Send this file: <input name="userfile" type="file"> <input type="submit" value="Send File"> </form> - My upload.php file are: <?php // In PHP earlier then 4.1.0, $HTTP_POST_FILES should be used instead of $_FILES. if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
    copy($_FILES['userfile']['tmp_name'], "/home/juque/public_html/VI_eaf/upload/");
} else {
    echo "Possible file upload attack. Filename: " . $_FILES['userfile']['name'];
} /* ...or... */ move_uploaded_file($_FILES['userfile']['tmp_name'], "/home/juque/public_html/VI_eaf/upload/"); ?> - My php.ini file_uploads = On - My upload directory had 777 permission. - My upload file is a simple .txt of 32 Bytes. - PHP 4.1.2 / Apache 1.3.23 - I have changed HTTP_POST_FILES for $_FILES Please GUYS.. any idea will be really appreciate. --jp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
________________________________________________________ Juan Pablo Aqueveque <juque@uct.cl> Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628

« previous php.general (#113948) next »