Welcome Guest, Not a member yet? Register   Sign In
Dealing with Sessions
#1

[eluser]mulama77[/eluser]
i came across this lines of code

$params['client_id'] = Session::get('client_id');

which when running produces

Fatal error: Class 'Session' not found in C:\xampp\htdocs\myapi\application\controllers\oauth.php on line 34

The initial tutorial does not have a class called Session. Is the above line of code same as

$params['client_id'] = $this->session->get('client_id');

which also produces

Fatal error: Call to a member function get() on a non-object in C:\xampp\htdocs\myapi\application\controllers\oauth.php on line 27

or what should i do to to make the first line of code work because when i run

$params['client_id'] = $this->get('client_id');

it works but the author insisted the use of sessions.
#2

[eluser]TheFuzzy0ne[/eluser]
I think you're using the oAuth library for FuelPHP, and not CodeIgniter.

You're second error is probably cause because you've not loaded the session library. You can do that in ./application/config/autoload.php. Also, the session library doesn't have a get() method.




Theme © iAndrew 2016 - Forum software by © MyBB