Welcome Guest, Not a member yet? Register   Sign In
Query String hook and (any) Open ID implementation.
#1

[eluser]Kindari[/eluser]
Anyone know why in the query string hook, clean_uri modifies $_SERVER['QUERY_STRING']?
Below is my adventure for the day and how I made OpenID work when using this hook.

----
Today I decided to implement OpenID on my server. I began having problems almost immediately, even following all directions in the various tutorials. I tried many OpenID implementations including ones just for PHP and even for CodeIgniter.

After a while I decided to test things on a fresh CI Install, and it worked great. So I started with the most obvious things that could be causing problems, my hooks.

After disabling my hooks in the configuration file, OpenID worked just fine with my existing site. I only have two hooks installed, CI uhoh and query string support. I suspected that Query String support was causing more of a problem then uhoh so I decided to trace where OpenID uses $_GET.

I found that it does not at all, or at least in the implementations I was testing. I found however that it does immediately use $_SERVER['QUERY_STRING']. So I looked at the hook file and found it was modifying the server variable during the 'clean_uri' function. I'm not exactly sure what the point of this cleaning was but commenting out the assignment to $_SERVER['QUERY_STRING'] both times and re-enabling the hook, everything was working again.

OpenID was logging in, $_GET once again existed, etc.




Theme © iAndrew 2016 - Forum software by © MyBB