From: mcratt at itctel dot com Operating system: RedHat Linux 2.4.18-3 PHP version: 4.3.2 PHP Bug Type: CGI related Bug description: Form data not passed to CGI scripts
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 bug report at http://bugs.php.net/?id=24240&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24240&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24240&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24240&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24240&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24240&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24240&r=support Expected behavior: http://bugs.php.net/fix.php?id=24240&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24240&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24240&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24240&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24240&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24240&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24240&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24240&r=gnused