i have written a small codeigniter test app that is currently running on my windows box.
i created a linux vm and have tried to install the app on this new virtual server.
some of my web app is running properly but other parts, no.
specifically, this works:
http://123.123.123.123/myapp/controller1/
but this does not:
http://123.123.123.123/myapp/controller2/mymethod/1/2/3
It fails with an error that it can’t load controller2_model.
Here’s the actual code for the controller that is failing (it’s really called xferLogger vs. controller2):
class xferLogger extends CI_Controller {
public function __construct() {
parent::__construct();
echo(2);
$this->load->model('xferLogger_model');
$this->load->helper('date'); //this library is needed for the base_url() method that is being called in the view "result.php"
$this->load->helper('url');
}
and here’s the model:
class xferLogger_model extends CI_Model {
public function __construct() {
$this->load->database();
}
The full error message is: An error was encountered. Unable to locate the model you have specified: xferlogger_model.
Here’s something I noticed. in the error message, you’ll notice that the “L” in logger is lowercase. but in my code, it’s a capital L.
I’ve checked in my controller, the model itself, and also the routes.php file. I can’t seem to find any problems with my casing.
??
From the userguide: Class names must have the first letter capitalized with the rest of the name lowercase. So therefore:
and your model load
and your PHP filename
Codeigniter Model Userguide