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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
21 + 1 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 10:01:28 2024 UTC