# Having semi-colon in query

**URL:** <https://www.ruby-forum.com/t/having-semi-colon-in-query/190565>\
**Category:** NGINX\
**Created:** [June 22, 2010, 9:08pm UTC](https://www.ruby-forum.com/t/having-semi-colon-in-query/190565 "2010-06-22T21:08:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/91b2a8/32.png) [@ankur](https://www.ruby-forum.com/u/ankur)\
**Post date:** [June 22, 2010, 9:08pm UTC](https://www.ruby-forum.com/t/having-semi-colon-in-query/190565/1 "2010-06-22T21:08:14Z")

</div>

Hi all,

I have a URL of the form: /abc?x=1&y=2;3. The nginx server passes  
the  
request to php-fpm thread. When I try to query for the value of ‘y’ I  
get  
‘2’ instead of ‘2;3’. Is this expected? Are semicolons somehow  
considered  
to be query delimiters?

Thanks,  
Ankur

---

<div class="post-metadata">

**Author:** ![ankur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/91b2a8/32.png) [@ankur](https://www.ruby-forum.com/u/ankur)\
**Post date:** [June 22, 2010, 9:52pm UTC](https://www.ruby-forum.com/t/having-semi-colon-in-query/190565/2 "2010-06-22T21:52:08Z")

</div>

Hi Ian,

So is it an nginx (or php-fpm?) bug that the value of ‘y’ shows as 2  
instead of ‘2;3’?

-Giri

---

<div class="post-metadata">

**Author:** ![ankur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/91b2a8/32.png) [@ankur](https://www.ruby-forum.com/u/ankur)\
**Post date:** [June 22, 2010, 9:29pm UTC](https://www.ruby-forum.com/t/having-semi-colon-in-query/190565/3 "2010-06-22T21:29:53Z")

</div>

On 22/06/2010 20:07, Ankur G. wrote:

> Hi all,
> 
> I have a URL of the form: /abc?x=1&y=2;3. The nginx server passes  
> the request to php-fpm thread. When I try to query for the value of  
> ‘y’ I get ‘2’ instead of ‘2;3’. Is this expected? Are semicolons  
> somehow considered to be query delimiters?

Hi Ankur,

There is no standard for delimiter, only common practise. You can use  
what you like.

The W3C has been recommending semicolon as a delimiter since 1994 or so.

That said, sending ‘&’ so that it comes back as ‘&’ is common,  
correct, conforms to standards and expected by users and search  
engines.

Regards

Ian

---

<div class="post-metadata">

**Author:** ![ankur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/91b2a8/32.png) [@ankur](https://www.ruby-forum.com/u/ankur)\
**Post date:** [June 22, 2010, 11:26pm UTC](https://www.ruby-forum.com/t/having-semi-colon-in-query/190565/4 "2010-06-22T23:26:24Z")

</div>

On 22/06/2010 20:51, Ankur G. wrote:

> So is it an nginx (or php-fpm?) bug that the value of ‘y’ shows as 2  
> instead of ‘2;3’?  
> Following the WC3 recommendations since 1994 is not a bug. 🙂

Its a php feature, controlled by an entry in php.ini. Find the line that  
contains

;arg\_separator.input = “;&”

Remove the first “;” activate it and the second to only have “&” active.

You might also check out the ';arg\_separator.output = “&” ’ line also.

I use 'arg\_separator.output = “&” ’

Regards

Ian

---

<div class="post-metadata">

**Author:** ![ankur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/91b2a8/32.png) [@ankur](https://www.ruby-forum.com/u/ankur)\
**Post date:** [June 23, 2010, 3:25am UTC](https://www.ruby-forum.com/t/having-semi-colon-in-query/190565/5 "2010-06-23T03:25:49Z")

</div>

Thanks a lot for your help, Ian!

-Ankur

---

<div class="post-metadata">

**Author:** ![ankur](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/91b2a8/32.png) [@ankur](https://www.ruby-forum.com/u/ankur)\
**Post date:** [June 22, 2010, 10:02pm UTC](https://www.ruby-forum.com/t/having-semi-colon-in-query/190565/6 "2010-06-22T22:02:40Z")

</div>

On Tue, Jun 22, 2010 at 12:51:09PM -0700, Ankur G. wrote:

> Hi Ian,
> 
> So is it an nginx (or php-fpm?) bug that the value of ‘y’ shows as 2  
> instead of ‘2;3’?

nginx does not process query string.

> > > ‘2’ instead of ‘2;3’. Is this expected? Are semicolons somehow considered  
> > > conforms to standards and expected by users and search engines.  
> > > [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**
