ID: 24694 Updated by: [EMAIL PROTECTED] Reported By: namejko at topiksolutions dot com -Status: Open +Status: Feedback Bug Type: HTTP related Operating System: Windows NT 5.1 build 2000 (XP) PHP Version: 4.3.1 New Comment:
Is the file_uploads ini setting enabled on your system? Previous Comments: ------------------------------------------------------------------------ [2003-07-21 14:06:56] namejko at topiksolutions dot com That build produces an output of completely blank (empty) arrays. Even $_POST, $_GET and $_FILES are empty. ------------------------------------------------------------------------ [2003-07-17 14:38:10] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-07-17 14:34:03] namejko at topiksolutions dot com Description: ------------ This version of PHP appears to not handle file uploads properly. Code verbatim from the documentation to use the multipart/form-data enctype in POST forms don't actually send the information properly into $_POST or $_FILES. Instead, the request comes across in $_GET, where it is unusable. In previous versions of PHP (in this case, tested on 4.0.6) the code works perfectly. Below are the HTML form code and the PHP code, together in one file. On 4.3.1, $_POST and $_FILES are empty arrays, whereas they are filled on 4.0.6. Reproduce code: --------------- <?php print_r($HTTP_POST_VARS); print_r($HTTP_GET_VARS); print_r($HTTP_POST_FILES); ?> <form method="post" enctype="multipart/form-data" action="<?=$PHP_SELF?>"> <input type="hidden" name="MAX_FILE_SIZE" value="30000"> File: <input name="userfile" type="file"> <input type="submit" name="submit" value="submit"> </form> Expected result: ---------------- This is what is returned under PHP 4.0.6: Array ( [MAX_FILE_SIZE] => 30000 [submit] => submit ) Array ( ) Array ( [userfile] => Array ( [name] => Icon7EFDA3AC3.txt [type] => application/octet-stream [tmp_name] => /tmp/phpEPVaEg [size] => 27648 ) ) ... Actual result: -------------- This is what is returned by PHP 4.3.1: Array ( ) Array ( [Content-Disposition:_form-data;_name] => \"MAX_FILE_SIZE\" 30000 -----------------------------7d32f4b280238 Content-Disposition: form-data; name=\"userfile\"; filename=\"C:\\Documents and Settings\\Zawitz\\Application Data\\Microsoft\\Installer\\{7EFDA3AC-8A61-43C0-B023-33866829C816}\\Icon7EFDA3AC3.txt\" Content-Type: application/octet-stream MZ ) Array ( ) --- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24694&edit=1