#27389 [Opn->Bgs]: $_POST variables not accessible from multiview
| From: | iliaa@php.net | Date: | Sat, 06 Mar 2004 19:24:16 +0000 |
| Subject: | #27389 [Opn->Bgs]: $_POST variables not accessible from multiview | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-56010@lists.php.net to get a copy of this message | ||
ID: 27389
Updated by: iliaa@php.net
Reported By: vanlei at yahoo dot com
-Status: Open
+Status: Bogus
Bug Type: Apache related
Operating System: Mac OS X
PHP Version: 4.3.4
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
The POST & GET data does not get passed to the
ErrorDocument handler, only the missing URL is.
Previous Comments:
------------------------------------------------------------------------
[2004-03-01 12:46:15] vanlei at yahoo dot com
I traced the problem a little better. I wasn't coming
in through the overriden php file, but through
ErrorDocument. Now I'm not sure if it is a bug or not,
but ErrorDocument doesn't see POST. In any case I
solved it in a more elegant way, but I'll leave this
here for comment. Should ErrorDocument receive POST
requests?
------------------------------------------------------------------------
[2004-02-26 06:00:10] postings-php-bug at hans-spath dot de
You should perhaps reread the Apache documentation. As far as I
understand it, Multiviews are used for automatic language selection and
aren't involved in your problem.
I've run some tests with http://my-server/script.php/morestuff/ using
GET and POST requests.
Linux, Apache 2, PHP 4.3.4 module: works
Windows, Apache 2, PHP 4.3.4 module: works
Windows, Apache 2, PHP 4.3.4 CGI: doesn't work (maybe
misconfiguration)
And it works even with MultiViews disabled.
Although I haven't tested Apache 1, I don't think there is a PHP
problem.
Try if a normal GET request works on such URLs, and if it doesn't, it
might be a problem with your apache configuration.
------------------------------------------------------------------------
[2004-02-25 21:31:44] vanlei at yahoo dot com
Apache: Server version: Apache/1.3.29 (Darwin)
httpd.conf:
Inside the config for the site, you need to add:
<Directory "/site/to/www">
Options MultiViews
</Directory>
PHP is configured as an apache mod. Version 4.3.4
------------------------------------------------------------------------
[2004-02-25 05:56:33] sniper@php.net
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to "Open".
Thank you for your interest in PHP.
Apache version, how to configure httpd.conf, how PHP is configured
(module/cgi), etc.
------------------------------------------------------------------------
[2004-02-24 23:55:29] vanlei at yahoo dot com
Description:
------------
$_POST variables aren't accessible from within a
multiview if one configures the action of a form to be
the child of a multiview.
In other words, If I set the action of a form to be
'example.com/multi/sub' where multi is a PHP file
called multi.php that catches the url 'example.com/
multi/sub/' (by using apache's multiviews), multi.php
will not have access to the $_POST variable.
It works if one sets the action as 'example.com/multi/
'.
Reproduce code:
---------------
Example code:
<form method="post"
action="http://example.com/multi/sub/"
name="form">
<input
type="submit"
name="submit"
value="Value" />
</form>
multi.php:
echo $_POST['submit']
Expected result:
----------------
Expected:
$_POST['submit'] == "Value"
Actual result:
--------------
Blank. I think PHP associates the $_POST variable with
/multi/sub when sub isn't a script/file. Instead the
request is handled by multi.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27389&edit=1