CodeIgniter Forums
system/libraries/Router.php function _validate_request - 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: system/libraries/Router.php function _validate_request (/showthread.php?tid=28930)



system/libraries/Router.php function _validate_request - El Forum - 03-25-2010

[eluser]Unknown[/eluser]
Hello together,

i found following bug on function _validate_request($segments) on line 201:

Code:
if (file_exists(APPPATH.'controllers/'.$segments[0].EXT))

if i check the path "application/controllers/login.php", file_exists returns a false, because the function is case sensitive on linux.

routes.php
Code:
$route['default_controller'] = "Login";

the default controller is set to "Login" but $segments[0] contains the value "login".

so i hope you understand my problem, because i get a "404 page not found" concerning this case sensitive function.

greetings


system/libraries/Router.php function _validate_request - El Forum - 03-26-2010

[eluser]n0xie[/eluser]
Err how about:
Code:
$route['default_controller'] = "login";



system/libraries/Router.php function _validate_request - El Forum - 03-26-2010

[eluser]Unknown[/eluser]
if i change the php file to login.php instead of Login.php, i can solve this problem. codeigniter should find the controller, whatever the php file is upper case or lower case.

but you are true, thats more a usability question instead of a critical system bug.


system/libraries/Router.php function _validate_request - El Forum - 03-26-2010

[eluser]n0xie[/eluser]
It's not a bug nor usability question. Linux is case sensitive.