From: johny at mysteri dot lu
Operating system: Linux Debian
PHP version: 4.3.11
PHP Bug Type: Variables related
Bug description: $_GET[] or $_POST[]: irrelevant
Description:
------------
I saw it, while coding a form. I put into the form an input, type hidden,
with name "func and value "editmember". Then, in the file where the posted
data should be read, I made a mistake, I put $_GET['func'], but it still
recognoized it, also when it was send by POST (yes I'm sute that the form
has POST as method).
Normally, it should only recognoize it when I write $_POST['func'].
Here's the configure line of the PHP installed on the used server:
Command '../configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2'
'--with-config-file-path=/etc/php4/apache2' '--enable-memory-limit'
'--disable-debug' '--with-regex=php' '--disable-rpath' '--disable-static'
'--with-pic' '--with-layout=GNU' '--with-pear=/usr/share/php'
'--enable-calendar' '--enable-sysvsem' '--enable-sysvshm'
'--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid'
'--enable-bcmath' '--with-bz2' '--enable-ctype' '--with-db4'
'--with-iconv' '--enable-exif' '--enable-filepro' '--enable-ftp'
'--with-gettext' '--enable-mbstring' '--with-pcre-regex=/usr'
'--enable-shmop' '--enable-sockets' '--enable-wddx' '--disable-xml'
'--with-expat-dir=/usr' '--with-xmlrpc' '--enable-yp' '--with-zlib'
'--without-pgsql' '--with-kerberos=/usr' '--with-openssl=/usr'
'--with-zip=/usr' '--enable-dbx'
'--with-mime-magic=/usr/share/misc/file/magic.mime'
'--with-exec-dir=/usr/lib/php4/libexec' '--without-mm' '--without-mysql'
'--without-sybase-ct'
Reproduce code:
---------------
<?
if ($_GET['func']) {
echo "PHP Result";
} else {
echo "<form method=\"POST\" action=\"file.php\">
<input type=\"hidden\" name=\"func\" value=\"editmember\">
<input type=\"submit\" value=\"Submit\">
</form>";
};
?>
Expected result:
----------------
Normally, pushing the Button "Submit", the Form should be displayed once
more.
Actual result:
--------------
PHP Result
--
Edit bug report at http://bugs.php.net/?id=33927&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33927&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=33927&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=33927&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33927&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33927&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33927&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33927&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33927&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33927&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33927&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=33927&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=33927&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33927&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33927&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33927&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33927&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33927&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33927&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33927&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33927&r=mysqlcfg