php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18759 HTTP_POST_VARS, _POST all empty
Submitted: 2002-08-06 13:32 UTC Modified: 2002-08-07 10:20 UTC
From: miker at sundialservices dot com Assigned:
Status: Closed Package: Variables related
PHP Version: 4.1.2 OS: Linux RH 7.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
25 + 6 = ?
Subscribe to this entry?

 
 [2002-08-06 13:32 UTC] miker at sundialservices dot com
As previously reported (but closed as "bogus?!") PHP loses 
all HTTP "POST" variables submitted on a simple form (that 
works in earlier versions).

Both the $HTTP_POST_VARS and the $_POST variable are 
completely empty.  A trivially simple form confirms this 
behavior.  (See prior bug reports.)

register_globals is ON.  safe_mode is OFF.

If you -know- that this bug does not exist in PHP 4.2 then 
I'll be happy to wrestle with trying to upgrade to it.  
But I need to -know-.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-06 13:47 UTC] miker at sundialservices dot com
Hmm... with this simple test-form:

<?php print serialize($_POST) ?>
<form action="test.php" method="post" 
enctype="multipart/form-data">
<input type="text" name="test" value="123">
<input type="submit" name="submit" value="test123">
</form>

It does not work at all when "enctype" is included, but if 
I remove this and save the file, then click "test123" 
TWICE, it suddenly works.

Likewise when I put "enctype" back in, and click the 
button TWICE, on the second attempt it doesn't work.

Even -more- strangely, I'm changing the input each time as 
I click the button.  First click after the change... it 
works, and the new data appears.  Second click... it stops 
working.  Remove "enctype."  Change and click.  It's 
there.  Change again and click.  No data.  Put it back in. 
 Change and click.  Nada.  Change and click AGAIN.  It's 
there!!

What the ...?
 [2002-08-07 03:22 UTC] yohgaki@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

In certain case, variables will not be initilized properly, but it does not supposed to behave as you mentioned.

Try CvS versions see if it helps.
 [2002-08-07 10:20 UTC] miker at sundialservices dot com
Duplicate of bug #18641. 
Confirmed to occur only when 
"enctype=multipart/form-data" as is the case in 
this application.  Reportedly fixed on 30Jul2002 
in release 4.2.x but I have not yet downloaded 
that to confirm.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 23:01:28 2024 UTC