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 Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or 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

Add a Patch

Pull Requests

Add a Pull Request

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-2021 The PHP Group
All rights reserved.
Last updated: Tue Aug 03 08:01:25 2021 UTC