#20725 [Fbk]: $_REQUEST not populated when there is no tmp dir or upload_tmp_dir not writable

From: Date: Thu, 05 Dec 2002 09:35:40 +0000
Subject: #20725 [Fbk]: $_REQUEST not populated when there is no tmp dir or upload_tmp_dir not writable
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-26711@lists.php.net to get a copy of this message
 ID:               20725
 Updated by:       msopacua@php.net
 Reported By:      msopacua@php.net
 Status:           Feedback
 Bug Type:         Scripting Engine problem
 Operating System: BSD/OS 4.2
 PHP Version:      4.3.0RC2
 New Comment:

cut and paste error on my part - sorry bout that. The output should be
array{0} twice.


Previous Comments:
------------------------------------------------------------------------

[2002-12-05 03:31:08] philip@php.net

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] msopacua@php.net

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] philip@php.net

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] iliaa@php.net

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.

------------------------------------------------------------------------

[2002-11-29 08:12:54] msopacua@php.net

Stumbled upon this, in a chrooted environment.

No php.ini (so default settings). No /tmp and /var/tmp or make
upload_tmp_dir not writeable for the webserver.

display_errors On
error_reporting 'no value' (E_ALL ^ E_NOTICE)

$_REQUEST/_POST are not populated.

Only when setting display_startup_errors to 'On', one gets a clue, what
is going on.

Example:
<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="submit" value="test" />
</form>
<pre>
<?php
var_dump($_REQUEST, $_POST);
?>
</pre>

output:
array(0){
}

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=20725&edit=1



Thread (8 messages)

« previous php.bugs (#26711) next »