PHP Classes

database_oauth_client_class

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  database_oauth_client_class  >  (Un) Subscribe thread alerts  
Subject:database_oauth_client_class
Summary:Multiple Arrays in Session variables
Messages:2
Author:Suzanne Wrede
Date:2014-01-18 08:11:01
Update:2014-01-18 08:36:42
 

  1. database_oauth_client_class   Reply   Report abuse  
Picture of Suzanne Wrede Suzanne Wrede - 2014-01-18 08:11:01
Hi,

I have no idea what I am doing but here goes. After using your impressive solution to access data from Fitbit using the login_with_fitbit.php, I am now trying to store the OAuth session info and suspect I have introduced a whole new world of bugs by updating the classes to work with PDO for SQL Server.

My efforts continue to fail because the $oauth variable is NULL and it seems to be NULL because the CreateOAuthSession does not perform the insert.

I find that the session variables all hold more than one value. For example, when CreateOAuthSession is called, the $parameters variable has more than one value for each variable - there are multiple arrays in the parameter which caused the insert to fail. A simple var_dump($session->state) in the CreateOAuthSession class returns: array(0) { } string(32) "299d5ca70a7bb06cee2f8a96b904caef" array(0) { } array(0) { } string(32) "83a19b40b5cb0433eb17599fbf96cbaf" array(0) { } array(0) { }

If I hard code values, the Insert succeeds so I know success is possible but clearly I am overloading the variables. Well, I say clearly but all that is really clear is that I don't know what I am doing...

Am I making any sense? Have a created this scenarios because of the PDO modifications or perhaps with my testing having created too many sessions floating around and if so, how do I address those/create a reasonable testing ground?

Thank you for any light you can shed,

Suzanne

  2. Re: database_oauth_client_class   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-01-18 08:36:42 - In reply to message 1 from Suzanne Wrede
Your message is a bit confusing. Lets see if I can explain what is expected.

The session state variable should only have a simple string. If you are setting it to arrays, you need to see where the variable is to fix what can be wrong.