ID:               33022
 Updated by:       [EMAIL PROTECTED]
 Reported By:      juha at mobilememoir dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         HTTP related
 Operating System: Redhat 9 Linux 2.4.20-19.9smp
 PHP Version:      4.3.10
 New Comment:

1. Try with PHP 4.3.11
2. If it fails, check what the variable contains with
var_dump($_REQUEST['startqid']);



Previous Comments:
------------------------------------------------------------------------

[2005-05-12 23:24:04] juha at mobilememoir dot com

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 this bug report at http://bugs.php.net/?id=33022&edit=1

Reply via email to