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

(01-15-2016, 08:17 AM)edcoder Wrote: 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

I upgraded 2.x to 3.x and replaced my system Directory with 3.x as per instructions. I get following error Error Message: Call to undefined method MY_Loader::_ci_load_class() Filename: /third_party/MX/Loader.php Line Number: 152.

I already have _ci_load_class method called but it does not exist in /application/core/MY_Loader class. 

What did I  miss ?

THanks,
Atul
Reply


Messages In This Thread
RE: Unable to load libraries when using CI 3 with HMVC - by atulshinh - 12-29-2016, 02:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB