Welcome Guest, Not a member yet? Register   Sign In
CI errors and Controller file naming
#1

[eluser]AlexandrosG[/eluser]
Ok! Here is a strange problem with CI code that relates to naming convention.

Case 1: If my controller's class file has a capital first letter then i get a 404 Page not found error because the _validate_request() method of Router.php fails. To be more detailed, what fails is the following IF :

Code:
if (file_exists(APPPATH.'controllers/'.$segments[0].'.php'))
  {
   return $segments;
  }

Case 2: If my controller's class file has a small first letter then i get o Server Error 500 because because the class instantiation command (this one: $CI = new $class(); ) in CodeIgniter.php fails!!

My application resides on a Ubuntu+Apache machine.
So, what should i do now??
#2

[eluser]ortwin.van.vessem[/eluser]
AlexandrosG,

Which version of CI are you using?
#3

[eluser]AlexandrosG[/eluser]
2.1.4
#4

[eluser]AlexandrosG[/eluser]
Problem solved, and the solution.....installing php-mysql.

Unbelievable; Yeep!




Theme © iAndrew 2016 - Forum software by © MyBB