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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lawrence k

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


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

    arg_separator.i nput = ";&"

    I want the PHP on the server consider both:

    &
    &

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

    arg_separator.i nput=";&;&"

    but that did not work.

  • Jerry Stuckle

    #2
    Re: how does one edit php.ini to allow multiple url parameter separators?

    lawrence k wrote:[color=blue]
    > This is what is set by default in the php.ini that is on our server:
    >
    > arg_separator.i nput = ";&"
    >
    > I want the PHP on the server consider both:
    >
    > &
    > &
    >
    > to be parameter separators. How do I do that? I tried:
    >
    > arg_separator.i nput=";&;&"
    >
    > but that did not work.
    >[/color]

    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.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    • lawrence k

      #3
      Re: how does one edit php.ini to allow multiple url parameter separators?


      Jerry Stuckle wrote:[color=blue]
      > lawrence k wrote:[color=green]
      > > This is what is set by default in the php.ini that is on our server:
      > >
      > > arg_separator.i nput = ";&"
      > >
      > > I want the PHP on the server consider both:
      > >
      > > &
      > > &
      > >
      > > to be parameter separators. How do I do that? I tried:
      > >
      > > arg_separator.i nput=";&;&"
      > >
      > > but that did not work.
      > >[/color]
      >
      > 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.[/color]

      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.

      Comment

      • Peter Fox

        #4
        Re: how does one edit php.ini to allow multiple url parameter separators?

        Following on from lawrence k's message. . .[color=blue]
        >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.[/color]



        & 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
        peterfox@eminen t.demon.co.uk.n ot.this.bit.no. html
        2 Tees Close, Witham, Essex.
        Gravity beer in Essex <http://www.eminent.dem on.co.uk>

        Comment

        • Jerry Stuckle

          #5
          Re: how does one edit php.ini to allow multiple url parameter separators?

          lawrence k wrote:[color=blue]
          > Jerry Stuckle wrote:
          >[color=green]
          >>lawrence k wrote:
          >>[color=darkred]
          >>>This is what is set by default in the php.ini that is on our server:
          >>>
          >>>arg_separato r.input = ";&"
          >>>
          >>>I want the PHP on the server consider both:
          >>>
          >>>&
          >>>&amp;
          >>>
          >>>to be parameter separators. How do I do that? I tried:
          >>>
          >>>arg_separato r.input=";&;&am p;"
          >>>
          >>>but that did not work.
          >>>[/color]
          >>
          >>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.[/color]
          >
          >
          > 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.
          >[/color]

          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.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          • Andy Hassall

            #6
            Re: how does one edit php.ini to allow multiple url parameter separators?

            On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lkrubner@geoci ties.com> wrote:
            [color=blue][color=green]
            >> I don't know how you'd ever get &amp as an input separator anyway.[/color]
            >
            >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.[/color]

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

            --
            Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
            http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

            Comment

            • Jan Pieter Kunst

              #7
              Re: how does one edit php.ini to allow multiple url parameter separators?

              It seems there is some confusion between arg_separator.o utput and
              arg_separator.i nput here.

              "&amp;" should be used for arg_separator.o utput, 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.i nput , 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



              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, <devnull@cauce. org> is een "spam trap".
              E-mail adres is <jpk"at"akamail .com>, waarbij "at" = @.

              Comment

              • Jerry Stuckle

                #8
                Re: how does one edit php.ini to allow multiple url parameter separators?

                Andy Hassall wrote:[color=blue]
                > On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lkrubner@geoci ties.com> wrote:
                >
                >[color=green][color=darkred]
                >>>I don't know how you'd ever get &amp as an input separator anyway.[/color]
                >>
                >>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.[/color]
                >
                >
                > You're probably confused with the OUTPUT separator, which does need to be
                > changed from its incorrect default of "&" to "&amp;".
                >[/color]

                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.
                jstucklex@attgl obal.net
                =============== ===

                Comment

                • Andy Hassall

                  #9
                  Re: how does one edit php.ini to allow multiple url parameter separators?

                  On Sun, 25 Jun 2006 12:40:05 -0400, Jerry Stuckle <jstucklex@attg lobal.net>
                  wrote:
                  [color=blue]
                  >Andy Hassall wrote:[color=green]
                  >> On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lkrubner@geoci ties.com> wrote:
                  >>[color=darkred]
                  >>>>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.[/color]
                  >>
                  >> You're probably confused with the OUTPUT separator, which does need to be
                  >> changed from its incorrect default of "&" to "&amp;".[/color]
                  >
                  >No, Andy, I'm not at all confused about this issue. I know quite well how it works.[/color]

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

                  --
                  Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
                  http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

                  Comment

                  • lawrence k

                    #10
                    Re: how does one edit php.ini to allow multiple url parameter separators?


                    Andy Hassall wrote:
                    On 24 Jun 2006 20:45:38 -0700, "lawrence k" <lkrubner@geoci ties.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.

                    Comment

                    Working...