Uploading files doesn't work anymore
Posted: Mon Sep 16, 2002 3:24 pm
Hi,
When I use the .php3 extension I don't have any problems uploading files using the following script:
<form name="Upload" ENCTYPE="multipart/form-data" action="test.php3" method="post">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="102400">
<INPUT TYPE="hidden" name="action" value="upload">
Upload File:
<INPUT NAME="uploadFile" TYPE="file">
<input type="submit" Value="Upload">
</form>
But when I use .php all seems to go ok, but in fact the $uploadFile variable stays empty! (also $uploadFile_name, $uploadFile_size as well as $_POST['uploadFile'] , $_POST['uploadFile']['name'] etc.) Any explanation for this?
BTW:
It's not the common register_globals_form-bug posted several times already on this forum. Other variables go perfectly.
(for example: $_POST["MAX_FILE_SIZE"]=102400
and $_POST["action"]=upload )
All other scripts work perfectly in both .php and .php3 (as long as I don't use php 4 functionality). I want to upload files AND I want to use some functionality not available in PHP3.
my latest guess is that my PHP4.2-server doesn't allow me to upload files anymore. How do I check this? My phpinfo() says:
file_uploads no value
Who will come with the solution?
Thanks a lot,
Herman
When I use the .php3 extension I don't have any problems uploading files using the following script:
<form name="Upload" ENCTYPE="multipart/form-data" action="test.php3" method="post">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="102400">
<INPUT TYPE="hidden" name="action" value="upload">
Upload File:
<INPUT NAME="uploadFile" TYPE="file">
<input type="submit" Value="Upload">
</form>
But when I use .php all seems to go ok, but in fact the $uploadFile variable stays empty! (also $uploadFile_name, $uploadFile_size as well as $_POST['uploadFile'] , $_POST['uploadFile']['name'] etc.) Any explanation for this?
BTW:
It's not the common register_globals_form-bug posted several times already on this forum. Other variables go perfectly.
(for example: $_POST["MAX_FILE_SIZE"]=102400
and $_POST["action"]=upload )
All other scripts work perfectly in both .php and .php3 (as long as I don't use php 4 functionality). I want to upload files AND I want to use some functionality not available in PHP3.
my latest guess is that my PHP4.2-server doesn't allow me to upload files anymore. How do I check this? My phpinfo() says:
file_uploads no value
Who will come with the solution?
Thanks a lot,
Herman