[SOLVED] Query strings combined with CI urls => stopped working in PHP 5.3 |
[eluser]Nick De Decker[/eluser]
Hello, I've been using CI 1.7.0 for development of my application. I use CI url's everywhere, but for credit card authorization my controller is called like this. http://<<myhostname>>/mycontroller/pay/ok?orderid=xxx&info=yyy ..... This doesn't work anymore on the customer's PHP 5.3 platform: I always get a 404: the page requested was not found (the CI page). I upgraded to 1.7.2 but it still won't work. Configuration is exactly the same, everything works except for this thing. if I put a print_r($_REQUEST) on top of the index.php it does echo out the orderid and info variables, but it doesn't reach the mycontroller/pay. I don't know enough of CI's flow to debug this. Any idea how to fix this ? Whenever I put ?something at the end of the url it stops working. Changing the config's enable querystring option doesn't help. Thanks in advance. Nick
[eluser]JHackamack[/eluser]
Have you tried changing your query string value: Code: Enabling Query Strings
[eluser]Nick De Decker[/eluser]
Yes I did. But didn't work. Calling this URI: /welcome/test/message?par1=test123&par2=test456 Works on CI 1.7.2 on my PHP5.2 installation. But fails with CI 1.7.2 on PHP5.3. I'm debugging right now and I'll keep you guys posted...
[eluser]JHackamack[/eluser]
It wouldn't be calling the same url Have you Try calling after changing your query strings? index.php?c=welcome&m=test&message&part1;=test123&par2=test456
[eluser]Nick De Decker[/eluser]
Hey, I just found the problem. In system/libraries/URI.php you got the _fetch_uri_string() function. This tries to set the path using $_SERVER['PATH_INFO']; Apparantly this doesn't exist on the client's server. It is called $_SERVER['ORIG_PATH_INFO'] there ![]() So I added a quick hack and now everything works again: Code: if(isset($_SERVER['ORIG_PATH_INFO'])) { Don't know why that is but it works now. Kind regards, Nick |
Welcome Guest, Not a member yet? Register Sign In |