0

when I use:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|favicon\.ico|robots\.txt|class|style|js)
RewriteRule ^(.*)$ /index.php/$1 [L]

in .htaccess and:

$config['uri_protocol'] = "PATH_INFO";

in config.php the result is: MY WINDOWS SERVER says: everything OK and MY LINUX SERVER says No input file specified

so I change .htaccess that way:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|favicon\.ico|robots\.txt|class|style|js)
RewriteRule ^(.*)$ /index.php?/$1 [L]

and in config.php:

$config['uri_protocol'] = "QUERY_STRING";

than: everything works BUT $_GET not!!! how can I use $_GET with such settings? simple:

parse_str($_SERVER['QUERY_STRING'], $_GET);

doesn't work now

Marcin Majchrzak
  • 662
  • 1
  • 11
  • 22

3 Answers3

0

You are probably using fastcgi PHP which means you should take a look at CI's user guide for troubleshooting: http://codeigniter.com/user_guide/installation/troubleshooting.html

-- EDIT --

I misunderstood the question. Enabling querystrings should be done through the CI config. Look at the bottom of this user guide page: http://codeigniter.com/user_guide/general/urls.html

Repox
  • 15,015
  • 8
  • 54
  • 79
  • yes, and I can't set cgi.fix_pathinfo to 0; what probably couse the problem. setting $config['index_page'] = "index.php?" doesn't make any difference; everything works without this - the question is - how to use/implement $_GET now? – Marcin Majchrzak Mar 08 '11 at 12:49
0

solved... I used this:

$ru = $_SERVER['REQUEST_URI'];
parse_str(substr($ru,strpos($ru,'?')+1), $_GET);

now I can use $_GET again

Marcin Majchrzak
  • 662
  • 1
  • 11
  • 22
  • That's not how you should do it - look at the bottom of this page: http://codeigniter.com/user_guide/general/urls.html or at my updated question. – Repox Mar 08 '11 at 14:44
0

Upgrade to CodeIgniter Reactor 2.0, $_GET works on most installations. 2.0.1 will be out this week which has even better support.

Phil Sturgeon
  • 30,637
  • 12
  • 78
  • 117