Welcome Guest, Not a member yet? Register   Sign In
Unable to load libraries when using CI 3 with HMVC
#8

(This post was last modified: 02-03-2016, 05:39 PM by edcoder. Edit Reason: Corrected the CI version and also made more clear the HMVC package used. )

I had to find a different solution since none of the previous suggestions worked for me...
I was using the older CI version (2x) but with the latest module class packages, the HMVC addon for CodeIgniter created by Wiredesignz, and I was still getting the error Huh :

Fatal error: Call to undefined method MY_Loader::_ci_load_library() in C:\YourFileSystemHere\application\third_party\MX\Loader.php on line 173

So, out of frustration I decided to backtrack and dig around in the relevant third party files...

I opened the file and went to line 173 and changed

$this->_ci_load_library($library, $params, $object_name);

to

$this->_ci_load_class($library, $params, $object_name);

to match the only loading class I could see in the parent class CI_Loader that would make sense.

This removed the fatal error, but I still got an error saying

In order to use the Session class you are required to set an encryption key in your config file.

I then recalled previously coming across advice recommending NOT to leave the session encryption key empty in the config file.

So I opened my config.php file and changed

$config['encryption_key'] = '';

to

$config['encryption_key'] = 'MustTypeSomethingHere';

And finally it worked! Smile

I hope this helps prevent some other poor soul from wasting unnecessary time and energy like I did. Rolleyes
Reply


Messages In This Thread
RE: Unable to load libraries when using CI 3 with HMVC - by edcoder - 01-15-2016, 08:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB