CodeIgniter Forums
I need help using the thirdy_party folder with Ion Auth! - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: I need help using the thirdy_party folder with Ion Auth! (/showthread.php?tid=66412)



I need help using the thirdy_party folder with Ion Auth! - encode_decode - 10-20-2016

I am a new user of this forum so I hope this post goes through!

I am having problems using Ion Auth from the third_party folder.

Does anyone have any tips?

I get the following error:

An Error Was Encountered
Unable to load the requested class: Ion_auth

I am using the following line of code:

$this->load->add_package_path(APPPATH.'third_party/ion_auth/')->library('ion_auth');

I am not too sure if this is right.

Any help would be appreciated.

Smile

To be more specific I am following along with a tutorial online that works! I just want to modify it so I can run Ion Auth from the third_party folder as I think I would be able to manage my application better this way.

PHP Code:
parent::__construct();

// This is how it is currently working!
$this->load->library('ion_auth');

// This would be something like how I would want it to work!
// $this->load->add_package_path(APPPATH.'third_party/ion_auth/')->library('ion_auth'); 

I know I have not provided a lot of information here - so if anyone thinks they can help me with this problem I can post a more information as needed! I was thinking too that there may even be a better way to do this that I am not thinking of.

I hope it is ok to provide this link to the online tutorial that I am following along with!

Thank you in advance for any help!
[url=http://avenir.ro/authentication-system-with-ion-auth-and-ci3/lets-install-ion-auth-library/][/url]


RE: I need help using the thirdy_party folder with Ion Auth! - ozzy mandiaz - 10-20-2016

1. have you verified that the version you downloaded will work with CI 3.X?
2. is php error logging turned on on your web server?
3. have you checked your web server logs for php errors?
4. have you opened the ion_auth.php file to verify that the text case is correct?

Just a few questions to help you down your path....
OM


RE: I need help using the thirdy_party folder with Ion Auth! - encode_decode - 10-20-2016

(10-20-2016, 01:37 PM)ozzy mandiaz Wrote: 1. have you verified that the version you downloaded will work with CI 3.X?
2. is php error logging turned on on your web server?
3. have you checked your web server logs for php errors?
4. have you opened the ion_auth.php file to verify that the text case is correct?

Just a few questions to help you down your path....
OM

Thank you very much for your reply!

Smile

The version that I have downloaded does indeed work with 3.X (I am using 3.1.0).
I do have php error logging turned on - it is very useful.

I have not checked the web server logs yet - as of the time of this reply anyhow! I will take a look at them in a few hours.

The text case is correct - I have the Ion Auth System working when I put the file in the CI counterpart folders but when I try to run it from the third_party folder I am unable to load the class. It is as if; you say - being displayed with an uppercase in the error but I can access it the same with:
Code:
$this->load->library('ion_auth');
but am unable to access with:
Code:
$this->load->add_package_path(APPPATH.'third_party/ion_auth/')->library('ion_auth');
I know it is something silly that I am doing . . .

Again; thank you so much for your reply - I will definitely go over all that again. I fear that the way I asked the question was not clear enough and for that my sincere apologies and I appreciate your time in answering!

Smile