ID: 20725 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] -Status: Feedback +Status: Open Bug Type: Scripting Engine problem Operating System: BSD/OS 4.2 -PHP Version: 4.3.0RC2 +PHP Version: 4.3.0-dev2002-12-05 New Comment:
Thanx to bug #20860, I found why my test didn't work. New testcase: <form action="<?php echo $_SERVER['PHP_SELF'];?>" method="POST" enctype="multipart/form-data"> <input type="hidden" name="this_var_should_be_set" value="foo" /> <input type="file" name="userfile" /> <input type="hidden" name="this_other_var_should_be_set" value="bar" /> <input type="submit" value="test" /> </form> <pre> <?php var_dump($_REQUEST, $_POST); ?> </pre> Output: array(2) { ["this_var_should_be_set"]=> string(3) "foo" ["ApacheSessionId"]=> string(35) "anonymized" } array(1) { ["this_var_should_be_set"]=> string(3) "foo" } The ApacheSessionId in there is a cookie, via mod_user_track, but is not relevant to the bug. Cvs build: PHP 4.3.0-dev (cli) (built: Dec 5 2002 09:30:48) Copyright (c) 1997-2002 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2002 Zend Technologies Previous Comments: ------------------------------------------------------------------------ [2002-12-05 03:35:39] [EMAIL PROTECTED] cut and paste error on my part - sorry bout that. The output should be array{0} twice. ------------------------------------------------------------------------ [2002-12-05 03:31:08] [EMAIL PROTECTED] You have: <?php var_dump($_REQUEST, $_POST); ?> </pre> output: array(0){ } This suggests one exists, it's just empty. Which one I wonder... ------------------------------------------------------------------------ [2002-12-05 03:09:04] [EMAIL PROTECTED] philip: $_REQUEST and $_POST both don't exist. display_startup_errors gives you a warning "File upload error - unable to create a temporary file" so you actually have to upload something for this bug to trigger. If upload_tmp_dir isn't set, it tries to use /var/tmp, /tmp or anything similar. Using latest 4.3 branch I can't reproduce it either, but this is another server. The server where I discovered this bug, is in production, so I won't be able to test it until some odd hours during the weekend. ------------------------------------------------------------------------ [2002-12-05 01:38:24] [EMAIL PROTECTED] I can't replicate either, and I set upload_tmp_dir to something that doesn't exist. But anyway can you separate the dump of $_POST and $_REQUEST so we know which one at least exists? And can you explain what display_startup_errors affect is on this exactly? And does it matter if upload_tmp_dir is set? Don't see why it would. Anyway, please do more tests and try to see if you can get it to work :) ------------------------------------------------------------------------ [2002-12-05 01:08:51] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-latest.zip I've been unable to replicate this problem using latest CVS of 4.3.0-dev/4.4.0-dev. Please try a later version and report back, there is nothing in the code to cause the behaviour you've described. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/20725 -- Edit this bug report at http://bugs.php.net/?id=20725&edit=1