CodeIgniter Forums
[RESOLVED] CI framework gives error in xampp1.7.3 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: [RESOLVED] CI framework gives error in xampp1.7.3 (/thread-31418.html)

Pages: 1 2 3


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-17-2010

[eluser]suba[/eluser]
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?


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-18-2010

[eluser]InsiteFX[/eluser]
Did you change your base url in config.php?

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

InsiteFX


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-18-2010

[eluser]suba[/eluser]
hi
thanks for your reply.

this is my index page.

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

This is my config page

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

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

thanks to u.


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-18-2010

[eluser]Buso[/eluser]
Quote:my model_sims file is inside in system/applications/model/ directory.

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


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-18-2010

[eluser]suba[/eluser]
Hi
yes.
model_sims file is inside under system/applications/model/

Thanks


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-18-2010

[eluser]InsiteFX[/eluser]
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

InsiteFX


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-19-2010

[eluser]suba[/eluser]
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
Code:
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)
{
$type=strtoupper($type);
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; }
break;
case "CITIZENSHIP":
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) {
$this->db->where('number',$key);
$query=$this->db->get('si_school_list');
foreach($query->result() as $row) { return $row->name; }
$query->free_result();
}
Then last line I got this error message.
Code:
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.


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-19-2010

[eluser]InsiteFX[/eluser]
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

InsiteFX


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-19-2010

[eluser]suba[/eluser]
hi,
yes.server and laptop are running CodeIgniter 1.7.2


[RESOLVED] CI framework gives error in xampp1.7.3 - El Forum - 06-20-2010

[eluser]InsiteFX[/eluser]
Did you try loading your model in the controller and not autoloading it?

InsiteFX