Search code examples
phpcodeignitercodeigniter-hmvc

CodeIgniter 3.0.6 and WireDesignz HMVC - Call to a member function on null


I have CodeIgniter 3.0.6 running with WireDesignz HMVC.

When running

modules::load('page/com_Page')->_GetPage();

I get online a

Call to a member function _GetPage() on null

But locally it is working. The directory structure is as following

application
public_html
public_html/components
public_html/components/page
public_html/components/page/controllers/com_Page
system

in the config I have

$document_root = $_SERVER['DOCUMENT_ROOT'];
$document_root_exploded = explode('/', $document_root);
$document_root_name = end($document_root_exploded); 

$config['modules_locations'] = array(
    APPPATH . '../' . $document_root_name . '/components/' => '../../' . $document_root_name . '/components/',
);

I have no clue why local (Windows Apache) its working and online not (Linux).


Solution

  • It has to do with case sensitive. In HMVC the controllers have to start with a capital.