From: prashant at goodhealthnyou dot com Operating system: Linux PHP version: 4.3.3 PHP Bug Type: *General Issues Bug description: Queries Regarding PHP 4.3.3
Description: ------------ Hi, There are some queries regarding PHP 4.1.As you mentioned in php 4.1 register_globals=off. are set for security reasons. Is it Required to have Form attribute as enctype="multipart/form-data" if i have a File Upload on the Particular Form. <form name=form1 action="test.php3" method="Post" enctype="multipart/form-data"> i.e <input type=file name=filename> I am Facing a Problem as when i am removing the enctype attribute in Form object, i am able to pass form values data from one form to another form i.e the destination form will able to retrieve the form values, but from the source form when i keep the enctype attribute in the source form object, i am unable to pass the values i.e the destination form is unable to retrieve the values passed from source form. Second Problem is I am unable to retrieve the image name using $_FILES['filename']['name']; in the Destination form. The source form has the file upload html tag <form name=form1 action="test.php3" method="Post" enctype="multipart/form-data"> i.e <input type=file name=filename> <input type=submit value=submit> Awaiting Your Prompt Reply, Thanks & Regards, Prashant S Akerkar Reproduce code: --------------- Source file source.php3 <form enctype="multipart/form-data" name = "doctor" action="dest.php3" method=post onSubmit = "return checkall(this)" > <input type=file name="image1"> <input type="submit" name="submit" value="Submit"> </form> Destination File dest.php3 echo $_FILES['image1']['name']; echo $_FILES['image1']['type']; echo $_FILES['image1']['error']; echo $HTTP_POST_FILES['image1']['name']; echo $HTTP_POST_FILES['image1']['type']; echo $HTTP_POST_FILES['image1']['size']; copy ("$image1","../../../".$coname."/".$_POST['logname']."/".$image1_name); Expected result: ---------------- The File Upload doesn't Work. The name of the File Uploaded is not printed here as shown in the code. Warning: Unable to open 'D:\\Prashant\\Novartisimages\\cropped\\69.jpg' for reading: No such file or directory Actual result: -------------- The file upload should work i.e file should get uploaded on the web server as well as all form objects data should get passed from source to destination file. -- Edit bug report at http://bugs.php.net/?id=26423&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26423&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26423&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=26423&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=26423&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=26423&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=26423&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=26423&r=support Expected behavior: http://bugs.php.net/fix.php?id=26423&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=26423&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=26423&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=26423&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26423&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=26423&r=dst IIS Stability: http://bugs.php.net/fix.php?id=26423&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=26423&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=26423&r=float