Welcome Guest, Not a member yet? Register   Sign In
[RESOLVED] CI framework gives error in xampp1.7.3

Hi all,

I installed xampp1.7.0 into my server.
I installed CI into my server.
am developing one project using CI.
going well.

But in my notebook , I installed xampp1.7.3 latest version.
I installed CI framework.
I have downloaded my project from server & put into my notebook.

Now I am trying to execute my project.
But they gives error message.

Error message is
Fatal Error: Class Model_sims not found in C:\xampp\htdocs\system\libraries\Loader.php on line 184

But I have model_sims file in appropriate location.
my model_sims file is inside in system/applications/model/ directory.

I have setup auto load page also.
autoload page has
$autoload['model'] = array('model_sims','model_students','model_templates');

please advise me what is the problem?

Did you change your base url in config.php?

Did you specify the correct paths to your system and application directory in index.php?


thanks for your reply.

this is my index page.

$system_folder = "system";
$application_folder = "application";

This is my config page

$config['base_url']    = "http://localhost/sims";
$config['index_page'] = "";

This is my .htaccess page
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(401.shtml)
RewriteRule ^(.*)$ index.php?/$1 [L]

thanks to u.

Quote:my model_sims file is inside in system/applications/model/ directory.

shouldn't your app folder be 'system/applications' then ?

model_sims file is inside under system/applications/model/


Most of us move the application folder out of the system folder,

makes it easier to upgrade CodeIgniter.

suba, your missing the trailing forward slash on your base_url


I put trailing slash on my base_url
still I got error.

When I execute my welcome page, browser displays content of model_sims file.
example: this content & statement has inside in model_sims file
function showKeyValue($type,$key)
// -----------------DON'T REMOVE THIS FUNCTION----------
{ $where=array('type'=>$type,'value'=>$key); $query=$this->db->get_where('information',$where);
foreach($query->result() as $row) { return $row->name; } $query->free_result(); }*/
function showKeyValue($type,$value)
switch($type) {
case "RACE": switch($value) {
case 1: return "MALAY"; break;
case 2: return "CHINESE"; break;
case 3: return "IND/PAK/SL"; default: return $value;
break; }
switch($value) {
case 1: return "SINGAPOREAN"; break;
case 2: return "SINGAPORE PR"; break;
case 3: return "ASIAN"; break;
case 4: return "NON-ASIAN"; break; }
break; }
function showSchoolName($key) {
foreach($query->result() as $row) { return $row->name; }
Then last line I got this error message.
Fatal error: Class 'Model_sims' not found in C:\xampp\htdocs\sims\system\libraries\Loader.php  on line 184.

But above two functions are inside in my model_sims file.
If model_sims does not load, how the browser displays the contents of the model_sims file.
how is possible.
please any one advice me.

I would install the same version 1.7.3 of XAMPP on the server as well,
plus make sure server and laptop are running CodeIgniter 1.7.2


yes.server and laptop are running CodeIgniter 1.7.2

Did you try loading your model in the controller and not autoloading it?


Theme © iAndrew 2016 - Forum software by © MyBB