php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #12324 arg_separator.output broken
Submitted: 2001-07-23 20:22 UTC Modified: 2005-09-02 13:24 UTC
From: voudras at phpking dot org Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: voudras at phpking dot org
New email:
PHP Version: OS:

 

 [2001-07-23 20:22 UTC] voudras at phpking dot org
I've tested this problem on both php4.0.5 and 4.0.6, and it has also reproduced on other machines. I will not however, that this problem does not seem to occur on windows/apache machines.

the problem is that get vars using an arg_separator.output other than '&' will be ignored when attempting to parse HTTP_GET_VARS.

there is an example avaliable at
http://wart.phpking.org/test.php
the source is visible at
http://wart.phpking.org/test.phps

a side note - it would seem that the transparent session info appended to a url by php will also not follow a new 'arg_separator.output' value.. for example - if i set the arg_separator.output to ';'..  my PHPSESSID will still be appended to the url with a '&'

-voudras

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-07-24 09:20 UTC] andy@php.net
you have your params mixed up.  replace arg_separator.output
with arg_separator.input and things will work.  I modified
your script below.  This one works as you wanted it to.

<?php
global $HTTP_POST_VARS,$HTTP_GET_VARS, $HTTP_COOKIE_VARS,
$PHP_SELF;

ini_set("arg_separator.input", ";");
define("a", ini_get("arg_separator.input"));


if($HTTP_GET_VARS){
$total = count($HTTP_GET_VARS);
echo "Displaying GET variables";
while(list($key, $val) = each($HTTP_GET_VARS)) {
echo "<br />Key: '$key'   Value '$val'";
}
}


echo "<hr>";
echo "<A HREF=\"$PHP_SELF?i=am".a."do=one\">Click to
activate test</a>";
echo "<hr>";

?>

 [2001-07-31 10:55 UTC] andy@php.net
i have gotten emails from people saying that they have reproduced
this error.  Can anybody from PHP verify this?  I have not been
able to reproduce this error (using the script in my last post.)
 [2001-07-31 11:00 UTC] andy@php.net
ok...  the problem exists in your script at

http://wart.phpking.org/test.php

but using the EXACT script that I created, it works fine...

Please use this one... (EXACTLY)

status -> closed
 [2001-07-31 18:10 UTC] voudras at phpking dot org
This is a tricky lil bug, real easy to overlook. At the following url i have a script with your example code - and it does not function properly:
http://wart.phpking.org/test3.php

you can see some other examples of how this doesnt work at
http://wart.phpking.org/test.php
http://wart.phpking.org/test2.php

again, this seems to execute fine on windows based php/apache systems
(which is probably a good clue as to where the problem exists).

- ini_get("arg_separator.input") does not return the 'local' value, but instead the default or php.ini value (this is different than with ini_get(
"arg_separator.output"). Perhpas this is intensional?

- the above problem probably contributes to the fact that where the query_string is parsed for variables - it always gets the default arg_separator.*


 [2001-07-31 20:03 UTC] sniper@php.net
arg_separator.output - defines which separator character
is used in the PHP written URLs (ie. transparent sessids)

arg_separator.input - defines which separator characrters
(yes, there can be many) are used to separate the variables
in query string. This can NOT changed in script since
the time the script is run, the query string has already
been processed. You can only change this in php.ini / httpd.conf / .htaccess files.

Reclassified as documentation problem. The ini-directives
documentation lacks (not only) these. Also, the documentation should be restructured to show which directives can be change and where. Some kind of table maybe?

--Jani

 [2005-09-02 13:24 UTC] nlopess@php.net
We already have a nice and up-to-date table with all ini options at http://php.net/manual/en/ini.php
Those particular options have already an explanation (which is linked from that table).
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 24 01:03:38 2021 UTC