From:             juha at mobilememoir dot com
Operating system: Redhat 9 Linux 2.4.20-19.9smp
PHP version:      4.3.10
PHP Bug Type:     HTTP related
Bug description:  unable to access $_REQUEST value

Description:
------------
This bug for unknown reason. Happens approximately 5 times for every 1000
times the script is run. The PHP script where this bug occurs is very
complicated so we couldn't figure what encourages this bug to occur. This
bug has been bothering us for months. Today we finally gaught it and
realized $_REQUEST is the problem. If you run print_r($_REQUEST) key
"startqid" is there with its value, but isset($_REQUEST['startqid'])
returns false and also if you try to assign "startqid" to a local variable
the value will be empty. We fixed this problem simply by replacing
$_REQUEST with $_POST, so this is definately a bug in PHP as all $_POST
values should exists always in $_REQUEST.

We are using Apache 1.3.33

'./configure' '--with-apxs=/var/apache1333/bin/apxs' '--with-mysql'
'--prefix=/var/apache1333/php'
'--with-config-file-path=/var/apache1333/php'
'--with-imap=/usr/local/imap-2004a' '--with-gd'
'--with-png-dir=/usr/include/lib'
'--with-zlib-dir=/root/Apache1333/zlib-1.2.1' '--enable-gd-native-ttf'
'--with-freetype-dir=/usr/include/freetype2' 

Reproduce code:
---------------
# THIS METHOD DOESN'T
if (isset($_REQUEST('startqid']))
{
    echo "Startqid is coming in ";
    $startqid=$_REQUEST['startqid'];
    echo "($startqid)";
}
else
{
    echo "Startqid not coming in";
}

# THIS METHOD WORKS
if (isset($_POST('startqid']))
{
    echo "Startqid is coming in ";
    $startqid=$_POST['startqid'];
    echo "($startqid)";
}
else
{
    echo "Startqid not coming in";
}

Expected result:
----------------
Startqid is coming in (1)
Startqid is coming in (1)

Actual result:
--------------
Startqid not coming in 
Startqid is coming in (1)

-- 
Edit bug report at http://bugs.php.net/?id=33022&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33022&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33022&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33022&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=33022&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=33022&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=33022&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=33022&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=33022&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=33022&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=33022&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=33022&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=33022&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=33022&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33022&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=33022&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=33022&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=33022&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33022&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=33022&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33022&r=mysqlcfg

Reply via email to