Bug #16915: Problems with super globals variables
| From: | Jakub dot Gnat at webdynamix dot de | Date: | Mon, 29 Apr 2002 18:53:51 +0000 |
| Subject: | Bug #16915: Problems with super globals variables | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-6508@lists.php.net to get a copy of this message | ||
From: Jakub.Gnat@webdynamix.de
Operating system: SuSe Linux 7.3
PHP version: 4.2.0
PHP Bug Type: Servlet related
Bug description: Problems with super globals variables
It seems to be that all super arrays are empty:
This script:
<?php
echo "Globals test: <br>";
if (is_array($_SERVER)) {
$size = sizeof($_SERVLET);
echo "_SERVER is array $size <br>";
foreach ($_SERVER as $key => $value) {
echo "Key: $key value: $value <br>";
}
}
if (is_array($_GET)) {
$size = sizeof($_GET);
echo "_GET is array $size <br>";
foreach ($_GET as $key => $value) {
echo "Key: $key value: $value <br>";
}
}
if (is_array($_POST)) {
$size = sizeof($_POST);
echo "_POST is array $size <br>";
foreach ($_POST as $key => $value) {
echo "Key: $key value: $value <br>";
}
}
if (is_array($_ENV)) {
$size = sizeof($_ENV);
echo "_ENV is array $size <br>";
foreach ($_ENV as $key => $value) {
echo "Key: $key value: $value <br>";
}
}
echo "PHP_SELF $PHP_SELF <br>";
flush();
?>
as result:
Globals test:
_SERVER is array 0
_GET is array 0
_POST is array 0
_ENV is array 0
PHP_SELF /examples/php-servlet/test/global.php
The arrays are empty.
My environment:
OS=Linux 2.4.10-4GB on i386
Tomcat 3.2.3 I use only Tomcat as web server without apache.
Java version=1.3.1_03
Java vendor=Sun Microsystems Inc.
--
Edit bug report at http://bugs.php.net/?id=16915&edit=1
--
Fixed in CVS: http://bugs.php.net/fix.php?id=16915&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=16915&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=16915&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=16915&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16915&r=support
Expected behavior: http://bugs.php.net/fix.php?id=16915&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=16915&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=16915&r=submittedtwice