Welcome Guest, Not a member yet? Register   Sign In
Please consider querystring support in 2.x

[eluser]WanWizard[/eluser]
Looks like your server runs in CGI mode, which requires the question mark.

Have a look at this thread for a possible solution, I don't have any CGI environments to test on.

[eluser]kungfun[/eluser]
Yes i had tried that approach. it didnt work before, i just tried again on the dev box, but changed APP_PATH to REDIRECT_APP_PATH and it worked. so ill try testing it on the production box now.

Thanks.

[eluser]sqwk[/eluser]
I made the changes as listed in ci-querystring-diff.txt (pbreit's version from #23) and suddenly get multiple instances of this warning on every page:

Code:
Message: Use of undefined constant UTF8_ENABLED - assumed 'UTF8_ENABLED'
Filename: core/Input.php
Line Number: 63 (and a lot more)

Query strings do not work. What am I missing?

There is quite a few different solutions to the querysting problem by now. Can someone summarise the different methods that do definitely work with 2.0—I am not sure whether I am extracting the right info from this threadWink

So far I tried replacing the core files with those from the exitecms repo, making the changes by hand (which produces the utf notice), the MY_Input extension method, as well as dhorrigan's hook. None seem to make query strings work.

[eluser]sqwk[/eluser]
Found the problem. It was a matter of moving the Input part behind the Unicode part in Codeigniter.php like so: (Not the other way around like it was in the patch file.)

Code:
/*
* ------------------------------------------------------
*  Instantiate the Unicode class
* ------------------------------------------------------
*
* Note: Order here is rather important as the Unicode
* class needs to be used very early on, but it cannot
* properly determine if UTf-8 can be supported until
* after the Config class is instantiated.
*
*/

    $UNI =& load_class('Unicode', 'core');

/*
* ------------------------------------------------------
*  Load the Input class and sanitize globals
* ------------------------------------------------------
*/
    $IN    =& load_class('Input', 'core');

Oh, and querystrings started working too… Happy days…Wink

[eluser]WanWizard[/eluser]
The only proper solution is that Ellislabs provides support for query strings in the core code.

All other solutions here are workarounds and hacks, that work for one person, and breaks it for another.

[eluser]jayrulez[/eluser]
[quote author="WanWizard" date="1282915298"]The only proper solution is that Ellislabs provides support for query strings in the core code.

All other solutions here are workarounds and hacks, that work for one person, and breaks it for another.[/quote]

I agree. I do not see a valid reason why one should be begging for fundamental web functionality in a web development framework. The senior codeigniter members defending EllisLab's stance saying it's for security reasons do not help the situation.

Something as fundamental $_GET should be available by default. The fact that Ellislab does not use $_GET does not mean that other developers should blindly abide by their decisions. If the developer writes proper code, then using $_GET should not create a security issue.

Codeigniter boasts that they do not get in the way of users' coding; How do they term this? In my opinion, this is getting in the way of programming. If they believe it's all for security, they should simply provide the means by which the application can be made "secure", not force it to be "secure".

I think that explanatin is bull.... I believe they are simply imposing their programming practices on the community.

[eluser]pbreit[/eluser]
jayrules, pretty much my sentiment exactly. GETting querystrings is so fundamental to web programming it is completely inexplicable for a framework not to provide first class support. And the defenders of the status quo are not helping the situation at all.

[eluser]pbreit[/eluser]
I emailed EllisLab about this and was advised to create a Feature Request:
http://ellislab.com/forums/viewthread/165822/

[eluser]sqwk[/eluser]
I got query strings to work with codeigniter, but killed them off again with my htaccess:

Code:
RewriteEngine On
RewriteBase /

RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]

Swapping the last line to this, fixes query strings on my development box, but produces an "no input file specified" error on the production server.

Code:
RewriteRule ^(.*)$ /index.php/$1 [L]

Is there an htaccess that would work with query strings on both servers?

[eluser]WanWizard[/eluser]
It is one of the issues with the current hacks.

For standard PHP installations, you need your last option, but for PHP in CGI mode, the question mark has to be there. A lot of hosters use PHP in CGI mode.




Theme © iAndrew 2016 - Forum software by © MyBB