Date: 09/06/00
- Next message: Zak Greant: "[PHP-DEV] Modifications to bugs.php.net"
- Previous message: Ron Chmara: "[PHP-DEV] Documentaion (Was: [PHP-DEV] PHP File Upload Security Hole - Still No Fix?"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] $HTTP_POST_(FILES|VARS) weirdness in latest CVS"
- Reply: Zeev Suraski: "Re: [PHP-DEV] $HTTP_POST_(FILES|VARS) weirdness in latest CVS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I am given to believe that uploaded file information is supposed to be
available in the $HTTP_POST_FILES array; however, I always seem to get
everything in $HTTP_POST_VARS, and what's more, no other form data
comes along with the file information.
Example:
<form action="<?= $PHP_SELF ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="2048">
<input type="file" name="fupload">
<input type="submit" name="action" value="Upload">
</form>
<pre>
<?php
error_reporting(E_ALL);
echo "<h2>\$HTTP_POST_VARS</h2>\n";
print_r($HTTP_POST_VARS);
echo "<h2>\$HTTP_POST_FILES</h2>\n";
print_r($HTTP_POST_FILES);
?>
</pre>
The output from this script (after selecting a file and uploading) is:
$HTTP_POST_VARS
Array
(
[fupload] => Array
(
[name] => 192_168_1_51.txt
[type] => text/plain
[tmp_name] => /tmp/phpGXdf0K
[size] => 786
)
)
$HTTP_POST_FILES
Array
(
)
This is with a module PHP, CVS from about 15 minutes ago.
Any ideas, or am I simply too hungry to be trying to think right now?
-- +----------------------------------------------------------------+ |Torben Wilson <torben <email protected>> Netmill iTech| |http://www.coastnet.com/~torben http://www.netmill.fi| |Ph: 1 250 383-9735 torben <email protected>| +----------------------------------------------------------------+-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Zak Greant: "[PHP-DEV] Modifications to bugs.php.net"
- Previous message: Ron Chmara: "[PHP-DEV] Documentaion (Was: [PHP-DEV] PHP File Upload Security Hole - Still No Fix?"
- Next in thread: Zeev Suraski: "Re: [PHP-DEV] $HTTP_POST_(FILES|VARS) weirdness in latest CVS"
- Reply: Zeev Suraski: "Re: [PHP-DEV] $HTTP_POST_(FILES|VARS) weirdness in latest CVS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

