CodeIgniter Forums
GET variable bug? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: GET variable bug? (/showthread.php?tid=16564)



GET variable bug? - El Forum - 03-10-2009

[eluser]ethixsystems[/eluser]
I am currently enabling GET variables by setting enable_query_strings to TRUE so we can pass GET variables using a class that we wrote outside of the CI framework. It all works with one exception - when I only pass a single GET variable, it comes back with a 404 error. (?a=1). However, when I have 2 or more, it works perfectly fine. (?a=1&b=2)

Does anyone know if this is a bug in CI? Or is there some sort of setting that is causing my issue? I'd rather not keep two versions of the class - one that works in CI and one for regular use.

Thanks.

Dan


GET variable bug? - El Forum - 03-10-2009

[eluser]TheFuzzy0ne[/eluser]
Please could you give us an example of the URL you're using?


GET variable bug? - El Forum - 03-10-2009

[eluser]drewbee[/eluser]
I remember this coming up before... hmmm... BRB

EDIT: Either I am having massive deja vu, or this has come up before. I couldn't get anything to turn up searching the forum. It's around somewhere.


GET variable bug? - El Forum - 03-10-2009

[eluser]ethixsystems[/eluser]
Example of not working: www.mysite.com/admin/viewreport?a=1
Example of working: www.mysite.com/admin/viewreport?a=1&b=2

I'd give you a link to the working page, but it's behind an administrator's login.


GET variable bug? - El Forum - 03-10-2009

[eluser]drewbee[/eluser]
Try different settings for your URI_PROTOCOL.


GET variable bug? - El Forum - 03-10-2009

[eluser]jedd[/eluser]
[quote author="ethixsystems" date="1236733863"]Example of not working: www.mysite.com/admin/viewreport?a=1
Example of working: www.mysite.com/admin/viewreport?a=1&b=2[/quote]

Out of curiosity, does this work or not:

Code:
www.mysite.com/admin/viewreport?a=1&



GET variable bug? - El Forum - 03-10-2009

[eluser]ethixsystems[/eluser]
jedd: using a=1& did not work.

However, we changed our URI_PROTOCOL from AUTO to PATH_INFO, and it worked correctly.

Thanks to all!