php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57350 Could not get $_REQUEST value
Submitted: 2006-11-07 03:34 UTC Modified: 2006-11-09 02:40 UTC
From: vvhung at yahoo dot com Assigned:
Status: Duplicate Package: APC (PECL)
PHP Version: 5.1.6 OS: Linux kernel 2.6.9
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: vvhung at yahoo dot com
New email:
PHP Version: OS:

 

 [2006-11-07 03:34 UTC] vvhung at yahoo dot com
Description:
------------
Could not get expected value, when call $_REQUEST["foo"] in a user-built function included from another file. (Still works fine if the function is in the same file)

Reproduce code:
---------------
* function.php:
    <?
      function getNumber($var) {
        return intval($var);
      }
    ?>
* index.php:
    <?
      include("function.php");
      echo getNumber($_REQUEST["foo"]) . "<BR>";
      echo getNumber($_GET["foo"]) . "<BR>";
    ?>

Calling http://test.server/index.php?foo=2 from browser, problem would happened with the second and later request to that URL.

Expected result:
----------------
2
2

Actual result:
--------------
First request:
2
2

Second and later request:
0
2

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-07 03:39 UTC] vvhung at yahoo dot com
APC & PHP settings:
+ using 3.0.12p2
+ register_globals = Off
+ auto_globals_jit = On
 [2006-11-07 13:00 UTC] gopalv82 at yahoo dot com
Works for me with CVS HEAD.

Dup of http://pecl.php.net/bugs/bug.php?id=8652

Anyway, thanks for the report.
 [2006-11-09 02:40 UTC] vvhung at yahoo dot com
where can I get the latest snapshots?
I found files in CVS but not whole bundle file (zip/gz).

Thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 02 21:01:28 2024 UTC