Re: Re: file upload faliure

From: Date: Mon, 21 Apr 2003 05:14:19 +0000
Subject: Re: Re: file upload faliure
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-19516@lists.php.net to get a copy of this message
dear S. H. Kang, > Ok, here is my own codes. plz use it as a reference. > upload.html > --------------------------- > <html> > ... > > <form enctype="multipart/form-data" > action="upload.php" method="post"> > Send this file: <input name="userfile" type="file"> > <input type="submit" value="Send File"> > </form> > ... > > </html> > ---------------------- > <? > // upload.php > > function fileupload() > { > if > (is_uploaded_file($_FILES['userfile']['tmp_name'])) > { > $PATH = $_SERVER['DOCUMENT_ROOT'] . "/tmp/"; > echo $_FILES['userfile'['type']; > copy($_FILES['userfile']['tmp_name'], $PATH . > $_FILES['userfile']['name']); > } > else > { > echo "Possible file upload attack: filename " . > > $_FILES['userfile']['name'] . "<br>."; > } > } > > fileupload(); > > ?> I have tried your code also but it gives me (with error_reporting(E_ALL) : """" Notice: Undefined index: userfile in C:\Program Files\Apache Group\Apache2\htdocs\php\upload.php on line 27 Notice: Undefined index: userfile in C:\Program Files\Apache Group\Apache2\htdocs\php\upload.php on line 35 Possible file upload attack: filename . """" To check my apache configuration i tried using a python cgi script to upload the file. It works fine, no problems at all with the python cgi. does php have some problem over SSL for file upload? as i previously mentioned my configuration is Apache 2.0.44 (win32) mod_ssl 2.0.44 OpenSSL 0.9.7a port 443 Php 4.3.1 Windows 2000 prof. ( service pack 3) THX, Vivek Kumar __________________________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo http://search.yahoo.com

« previous php.windows (#19516) next »