[eluser]CodeSpeed[/eluser]
I'm developing a billing software (it's more of an experiment to get familiar with CI) and I was doing so under Windows XP with no problems.
I recently switched to Linux and I started getting a "class not found" error, I thought it might have been because of incorrect filenaming (linux is case sensitive) but after a code review I found no such errors.
So I downloaded CI again and setup a clean install.
Then I proceeded to extend the controller class with only a constructor to keep it simple:
Code:
<?php
/* FILE 'application/libraries/my_controller.php' */
class MY_Controller extends Controller
{
public function __construct()
{
parent::__construct();
}
}
?>
Then in the 'application/controllers/welcome.php' controller I changed the name of the "Controller" class it extends to my new extended class "MY_Controller"
Code:
<?php
class Welcome extends MY_Controller
{
public function Welcome()
{
parent::__construct();
}
public function index()
{
$this->load->view('welcome_message');
}
}
/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */
Then I run the site and I get
Quote:Fatal error: Class 'MY_Controller' not found in /home/joseph/public_html/samp/system/application/controllers/welcome.php on line 4
But if I add this to the beginning of the welcome.php file, it will work.
Code:
require_once(APPPATH.'libraries/my_controller.php');
So CI is not being able to see the extension file. Maybe it's a path problem since I didn't have this problem under Windows, but I ran out of ideas.
What am I doing wrong??? I hope you can help me
Thank you!