Bug 72551 - URL arguments do not get passed to a php program.
Summary: URL arguments do not get passed to a php program.
Status: CLOSED DUPLICATE of bug 72752
Alias: None
Product: Red Hat Public Beta
Classification: Retired
Component: php (Show other bugs)
(Show other bugs)
Version: null
Hardware: i386 Linux
Target Milestone: ---
Assignee: Phil Copeland
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2002-08-25 09:33 UTC by Pedro Soria-Rodriguez
Modified: 2007-04-18 16:45 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-08-27 18:56:53 UTC
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 09:34 UTC, Pedro Soria-Rodriguez
no flags Details

Description Pedro Soria-Rodriguez 2002-08-25 09:33:14 UTC
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 09:34:14 UTC
Created attachment 72824 [details]
Output from "test.php" when run with key=3 as an argument

Comment 2 Pedro Soria-Rodriguez 2002-08-25 09:36:50 UTC
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 04:49:04 UTC
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 18:56:44 UTC
*** Bug 72752 has been marked as a duplicate of this bug. ***

Comment 5 Phil Copeland 2002-08-31 06:39:49 UTC

*** 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.