Bug 72551 - URL arguments do not get passed to a php program.
URL arguments do not get passed to a php program.
Status: CLOSED DUPLICATE of bug 72752
Product: Red Hat Public Beta
Classification: Retired
Component: php (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Phil Copeland
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2002-08-25 05:33 EDT by Pedro Soria-Rodriguez
Modified: 2007-04-18 12:45 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-27 14:56:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Output from "test.php" when run with key=3 as an argument (50.56 KB, text/html)
2002-08-25 05:34 EDT, Pedro Soria-Rodriguez
no flags Details

  None (edit)
Description Pedro Soria-Rodriguez 2002-08-25 05:33:14 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722

Description of problem:
I have found that the arguments passed through a URL to a php app do not reach
my php code.

The code for a "test.php" program is
    echo "value of key: zzz" . $key . "xxx<br>\n";

When called with the URL "test.php?key=3", the output result is:
     value of key: zzzxxx
instead of the expected:
     value of key: zzz3xxx

The call to phpinfo() returns these:
_GET["key"]                  3 
_SERVER["QUERY_STRING"]      key=3
_SERVER["REQUEST_URI"]       /test.php?key=3 
_SERVER["SCRIPT_NAME"]       /test.php 
_SERVER["PHP_SELF"]          /test.php 
_SERVER["argv"]              Array
                               [0] => key=3

_SERVER["argc"]              1 

The full output from phpinfo is included in the attached file "test.php.html". 
  You will see that I accessed the server remotely, but I obtained the same
result accessing it locally (on the same machine).

Version-Release number of selected component (if applicable):
# rpm -q php

How reproducible:

Steps to Reproduce:
Simply run the program test.php?key=3  through the apache web server again.

Additional info:
Comment 1 Pedro Soria-Rodriguez 2002-08-25 05:34:14 EDT
Created attachment 72824 [details]
Output from "test.php" when run with key=3 as an argument
Comment 2 Pedro Soria-Rodriguez 2002-08-25 05:36:50 EDT
The attachement test.php.html shows that I direct error messages to 
/tmp/php.errors.txt,   but when I found the bug described above, the
php.errors.txt file does not show any messages.

Comment 3 Stu Tomlinson 2002-08-26 00:49:04 EDT
Not a bug - since PHP 4.2.0, external parameters are not by default registered as
global variables. See the Warning box on this page:

You should either set "register_globals = on" in /etc/php.ini, or (preferred)
switch to the new superglobal arrays (eg. $_GET['key'] )
Comment 4 Phil Copeland 2002-08-27 14:56:44 EDT
*** Bug 72752 has been marked as a duplicate of this bug. ***
Comment 5 Phil Copeland 2002-08-31 02:39:49 EDT

*** This bug has been marked as a duplicate of 72752 ***

Note You need to log in before you can comment on or make changes to this bug.