Newbie having problems calling controller |
[eluser]Jeffrey Lasut[/eluser]
First of all I've been searching this form inside out, but couldn't find a working solution for me. I'm using a clean installation of CI 1.6.2, I got this one placed in my apache root and can see the welcomepage. I create a file called home.php Code: <?php When requesting for http://localhost/CodeIgniter/index.php/home I'm getting a page not found, this is the same for the default http://localhost/CodeIgniter/index.php/welcome If i'm setting $route['default_controller'] = "welcome"; to $route['default_controller'] = "home"; I can see test. Things I tried: - $config['index_page'] = "index.php?"; - using .htaccess Code: <IfModule mod_rewrite.c> My current config: $config['base_url'] = "http://127.0.0.1/CodeIgniter/"; $config['index_page'] = "index.php?"; $config['uri_protocol'] = "QUERY_STRING"; (AUTO seems not to be working) $route['default_controller'] = "home"; These are my system details: Windows XP Apache/2.0.59 (Win32) Server at 127.0.0.1 Port 80 PHP Version 4.4.7 CodeIgniter 1.6.2 I hope someone can help me! Thanx
[eluser]Michael Wales[/eluser]
So, in Apache web root you have a folder CodeIgniter, which houses your index.php? (./htdocs/CodeIgniter/index.php). Just want to make sure we start off on the same foot here. If you change the default controller it works - so we know it's not filesystem. Try this: Ditch the .htacess file for now. Change index_page to index.php Change uri_protocol to each of the diff. settings and try to load the page. REQUEST_URI has a good track record for working on oddly configured hosts.
[eluser]Jeffrey Lasut[/eluser]
[quote author="Michael Wales" date="1211651284"]So, in Apache web root you have a folder CodeIgniter, which houses your index.php? (./htdocs/CodeIgniter/index.php). Just want to make sure we start off on the same foot here. If you change the default controller it works - so we know it's not filesystem. Try this: Ditch the .htacess file for now. Change index_page to index.php Change uri_protocol to each of the diff. settings and try to load the page. REQUEST_URI has a good track record for working on oddly configured hosts.[/quote] Michael thanx for your reply. Thats correct, a folder which houses the index.php called CodeIgniter (It is a clean CI installation) is standing in the Apache web root. I've tried your setting with no result, if I'm using QUERY_STRING this is working with this url: http://localhost/CodeIgniter/index.php?home Could this be a because a corrupt Apache / PHP setting? Thanx
[eluser]JWarren[/eluser]
I was having the same problem starting with version 1.6. It only occurs, however, when CI is in a sub-folder and I believe only on Windows. Someone on this board suggested changing $config['uri_protocol'] from "AUTO" to "PATH_INFO" and that fixed it for me.
[eluser]Jeffrey Lasut[/eluser]
[quote author="JWarren" date="1212263561"]I was having the same problem starting with version 1.6. It only occurs, however, when CI is in a sub-folder and I believe only on Windows. Someone on this board suggested changing $config['uri_protocol'] from "AUTO" to "PATH_INFO" and that fixed it for me.[/quote] Thanx for your reply! I will try this later one today. Strange enough this url is working: http://localhost/CodeIgniter/index.php?home/index This way I can call any function index or other.
[eluser]Jeffrey Lasut[/eluser]
[quote author="JWarren" date="1212263561"]I was having the same problem starting with version 1.6. It only occurs, however, when CI is in a sub-folder and I believe only on Windows. Someone on this board suggested changing $config['uri_protocol'] from "AUTO" to "PATH_INFO" and that fixed it for me.[/quote] Changing to PATH_INFO dosn't work, only the QUERY_STRING option seems to be working. |
Welcome Guest, Not a member yet? Register Sign In |