file upload failure
| From: | (Vivek Kumar) | Date: | Fri, 18 Apr 2003 11:52:20 +0000 |
| Subject: | file upload failure | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-19479@lists.php.net to get a copy of this message | ||
Hi all,
i am trying to upload files over ssl in PHP.
The html code looks like this:
<html>
<head><title>A file upload form</title></head>
<body>
<center>This is a file upload form..</center>
<form enctype="multipart/form-data"
action="https://foobar.org/php/fileupload.php"
method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
Send this file : <input name="userfile" type="file">
<input type="submit" value="send file">
</form>
</body>
</html>
and the PHP code like:
<?php
print_r($_FILES);
print_r($HTTP_POST_FILES);
echo "File Name:
",$_FILES['userfile']['name'],"<br>";
echo "File Type:
",$_FILES['userfile']['type'],"<br>";
echo "File Size:
",$_FILES['userfile']['size'],"<br>";
echo "File Tempname:
",$_FILES['userfile']['tmp_name'],"<br>";
echo "Upload Error:
",$_FILES['userfile']['error'],"<br>";
?>
but when i post the form after selecting the file i get the output like :
Array ( ) Array ( ) File Name:
File Type:
File Size:
File Tempname:
Upload Error:
I even tried it after removing the SSL but it didn't worked even then. I
was not able to find out what is going wrong here. Is this a bug or
something wrong with the code itself.
I am using PHP-4.3.1-win32 manual install as an apache module,
Apache-2.0.44-win32 with mod_ssl on Windows 2000.
THX
vivek kumar