#24240 [Opn->Bgs]: Form data not passed to CGI scripts
| From: | sniper@php.net | Date: | Wed, 18 Jun 2003 18:09:14 +0000 |
| Subject: | #24240 [Opn->Bgs]: Form data not passed to CGI scripts | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-42201@lists.php.net to get a copy of this message | ||
ID: 24240
Updated by: sniper@php.net
Reported By: mcratt at itctel dot com
-Status: Open
+Status: Bogus
Bug Type: CGI related
Operating System: RedHat Linux 2.4.18-3
PHP Version: 4.3.2
New Comment:
Misconfigured system. Works fine here with properly configured Apache.
Previous Comments:
------------------------------------------------------------------------
[2003-06-18 00:26:55] mcratt at itctel dot com
Description:
------------
Using PHP 4.3.2 CGI:
Data entered in an HTML form is not being passed to CGI script. The
following methods are affected:
$HTTP_POST_VARS, $HTTP_GET_VARS, $_POST, $_GET and using the variable
names as they appear in the HTML form.
Register Globals => ON
OS: RedHat Linux 2.4.18-3
Apache Version: 1.3.27
Configure Command => './configure' '--prefix=/usr/local'
'--with-apache=../../apache_1.3.27' '--enable-exif'
'--enable-track-vars' '--with-calendar=shared' '--enable-magic-quotes'
'--enable-trans-sid' '--enable-wddx' '--enable-ftp'
'--enable-inline-optimization' '--enable-memory-limit'
'--with-gd=/usr/local' '--with-zlib' '--enable-gd-native-tt'
'--with-t1lib=/usr/local' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-zlib-dir=/usr' '--with-ttf' '--with-freetype-dir=/usr/local'
'--with-mhash=/usr/local' '--with-mcrypt=/usr/local'
'--with-pdflib=/usr/local' '--with-tiff-dir=/usr'
'--with-jpeg-dir=/usr' '--with-zlib-dir=/usr' '--with-openssl=/usr'
'--with-curl=/usr' '--with-ldap'
Reproduce code:
---------------
HTML form:
<form name="the_form" action="some.cgi" method="post"> // or
method="get"
<input type="text" name="var01">
<input type="text" name="var02">
<input type="submit" value="Submit">
</form>
some.cgi:
#!/usr/bin/php
<?php
$var01 = $_POST['var01']; // or $var01 = $_GET['var01'], etc.
$var02 = $_POST['var02'}; // or $var02 = $_GET['var02'], etc.
echo "Content-type: text/html\n\n";
echo "var01 = $var01 and var02 = $var02.";
?>
Expected result:
----------------
var01 = <somevalue> and var02 = <anothervalue>.
Actual result:
--------------
var01 = and var02 =.
$_SERVER and $_ENV will contain the correct query string using get.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24240&edit=1