Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

295
Views
Cannot call external Model while on server Codeigniter HMVC but works fine on local

An uncaught Exception was encountered

Type: RuntimeException

Message: Unable to locate the model you have specified: Impact_model

Filename: /home/appliedi/public_html/multisector.Nutrition.com/system/core/Loader.php

Line Number: 344

Backtrace:

File: /home/appliedi/public_html/multisector.Nutrition.com/application/third_party/MX/Loader.php Line: 213 Function: model

File: /home/appliedi/public_html/multisector.Nutrition.com/application/modules/Ministry/controllers/Ministry.php Line: 11 Function: model

File: /home/appliedi/public_html/multisector.Nutrition.com/index.php Line: 315 Function: require_once //error at this line on controller

<?php
class Ministry extends MX_Controller
{
    function __construct()
    {
        parent::__construct();
        $this->load->model('Ministry_model');
        //error i think cant call external controller model
        $this->load->model('Impact/Impact_model');
        //---------------------------------
        $sad = $this->session->all_userdata();
        if(!$sad['checkLogin'] == true)
        {
          redirect( base_url('login') );
        }
    }
 }
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

<?php
class Ministry extends MX_Controller
{
  function index()
  {
     $this->load->model('Ministry_model');
     $this->load->model('Impact/Impact_model');
     $sad = $this->session->all_userdata();
     if(!$sad['checkLogin'] == true)
     {
         redirect( base_url('login') );
     }
  }
}
over 4 years ago · Santiago Trujillo Report

0

make sure all model filename & class name are in capital letters..linux is case sensitive unlike windows ..

over 4 years ago · Santiago Trujillo Report

0

On serveryou should follow tha name pattern as:

For Model:

Filename: mymodel.php

In File:

class Mymodel extends CI_Model{
    //code
}

For Controller:

Filename: Mycontroller.php

In File:

class Mycontroller extends CI_Controller{
    //code
}
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!