By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,558 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,558 IT Pros & Developers. It's quick & easy.

how does one edit php.ini to allow multiple url parameter separators?

P: n/a

This is what is set by default in the php.ini that is on our server:

arg_separator.input = ";&"

I want the PHP on the server consider both:

&
&

to be parameter separators. How do I do that? I tried:

arg_separator.input=";&;&"

but that did not work.

Jun 25 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
lawrence k wrote:
This is what is set by default in the php.ini that is on our server:

arg_separator.input = ";&"

I want the PHP on the server consider both:

&
&

to be parameter separators. How do I do that? I tried:

arg_separator.input=";&;&"

but that did not work.


It's not possible - an input separator is a single character. See the comments
in the php.ini file:

"NOTE: Every character in this directive is considered as separator!"

I don't know how you'd ever get &amp as an input separator anyway.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 25 '06 #2

P: n/a

Jerry Stuckle wrote:
lawrence k wrote:
This is what is set by default in the php.ini that is on our server:

arg_separator.input = ";&"

I want the PHP on the server consider both:

&
&

to be parameter separators. How do I do that? I tried:

arg_separator.input=";&;&"

but that did not work.


It's not possible - an input separator is a single character. See the comments
in the php.ini file:

"NOTE: Every character in this directive is considered as separator!"

I don't know how you'd ever get &amp as an input separator anyway.


But that's impossible. "&" is the separator that the W3C.org
suggests, and I know I've seen sites that do it in a way that conforms
to standards.

I think I asked this question a few years ago, but I can't find it now
through Google. Still, the idea that every site that uses PHP is
non-conforming to web standards clearly can't be right.

I suppose "&" by itself would work? I'll give that a try.

Jun 25 '06 #3

P: n/a
Following on from lawrence k's message. . .
But that's impossible. "&" is the separator that the W3C.org
suggests, and I know I've seen sites that do it in a way that conforms
to standards.


& is to &
as
seven is to 7

ie. you're interpreting your documents too literally and you don't have
a problem.

--
PETER FOX Not the same since the poster business went to the wall
pe******@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>
Jun 25 '06 #4

P: n/a
lawrence k wrote:
Jerry Stuckle wrote:
lawrence k wrote:
This is what is set by default in the php.ini that is on our server:

arg_separator.input = ";&"

I want the PHP on the server consider both:

&
&amp;

to be parameter separators. How do I do that? I tried:

arg_separator.input=";&;&amp;"

but that did not work.


It's not possible - an input separator is a single character. See the comments
in the php.ini file:

"NOTE: Every character in this directive is considered as separator!"

I don't know how you'd ever get &amp as an input separator anyway.

But that's impossible. "&amp;" is the separator that the W3C.org
suggests, and I know I've seen sites that do it in a way that conforms
to standards.

I think I asked this question a few years ago, but I can't find it now
through Google. Still, the idea that every site that uses PHP is
non-conforming to web standards clearly can't be right.

I suppose "&amp;" by itself would work? I'll give that a try.


Read the comments in the php.ini file. And understand what &amp is - and it's
relationship with the ampersand character.

Separators are a single character. No more, no less.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 25 '06 #5

P: n/a
On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lk******@geocities.com> wrote:
I don't know how you'd ever get &amp as an input separator anyway.


But that's impossible. "&amp;" is the separator that the W3C.org
suggests, and I know I've seen sites that do it in a way that conforms
to standards.

I think I asked this question a few years ago, but I can't find it now
through Google. Still, the idea that every site that uses PHP is
non-conforming to web standards clearly can't be right.


You're probably confused with the OUTPUT separator, which does need to be
changed from its incorrect default of "&" to "&amp;".

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jun 25 '06 #6

P: n/a
It seems there is some confusion between arg_separator.output and
arg_separator.input here.

"&amp;" should be used for arg_separator.output, i.e. URL's generated by
PHP, so that those webpage that use those URL's are valid.

"&" or ";" should be used for arg_separator.input , i.e. incoming GET
requests. In that context the separator is just "&", not "&amp;".

Note how clicking on an "&amp;" separated URL:

<a href="http://example.com/script.php?var1=this&amp;var2=that">click</a>

Results in

http://example.com/script.php?var1=this&var2=that

In the location bar of your browser.

The browser translates the "&amp;" representation on the webpage of the
"&" character back to the actual "&" character for input purposes.

JP

--
Sorry, <de*****@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.
Jun 25 '06 #7

P: n/a
Andy Hassall wrote:
On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lk******@geocities.com> wrote:

I don't know how you'd ever get &amp as an input separator anyway.


But that's impossible. "&amp;" is the separator that the W3C.org
suggests, and I know I've seen sites that do it in a way that conforms
to standards.

I think I asked this question a few years ago, but I can't find it now
through Google. Still, the idea that every site that uses PHP is
non-conforming to web standards clearly can't be right.

You're probably confused with the OUTPUT separator, which does need to be
changed from its incorrect default of "&" to "&amp;".


No, Andy, I'm not at all confused about this issue. I know quite well how it works.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jun 25 '06 #8

P: n/a
On Sun, 25 Jun 2006 12:40:05 -0400, Jerry Stuckle <js*******@attglobal.net>
wrote:
Andy Hassall wrote:
On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lk******@geocities.com> wrote:
I don't know how you'd ever get &amp as an input separator anyway.

But that's impossible. "&amp;" is the separator that the W3C.org
suggests, and I know I've seen sites that do it in a way that conforms
to standards.

I think I asked this question a few years ago, but I can't find it now
through Google. Still, the idea that every site that uses PHP is
non-conforming to web standards clearly can't be right.


You're probably confused with the OUTPUT separator, which does need to be
changed from its incorrect default of "&" to "&amp;".


No, Andy, I'm not at all confused about this issue. I know quite well how it works.


What? You seem to be confused about who I'm replying to, I was talking to
lawrence...

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jun 25 '06 #9

P: n/a

Andy Hassall wrote:
On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lk******@geocities.comwrote:
I don't know how you'd ever get &amp as an input separator anyway.
But that's impossible. "&amp;" is the separator that the W3C.org
suggests, and I know I've seen sites that do it in a way that conforms
to standards.

I think I asked this question a few years ago, but I can't find it now
through Google. Still, the idea that every site that uses PHP is
non-conforming to web standards clearly can't be right.

You're probably confused with the OUTPUT separator, which does need to be
changed from its incorrect default of "&" to "&amp;".
Thanks. You're right, I was confusing them.

Jul 2 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.