Welcome Guest, Not a member yet? Register   Sign In
Commands out of sync; you can't run this command now
#7

(This post was last modified: 12-31-2015, 04:25 PM by mike7418.)

(12-31-2015, 11:11 AM)mwhitney Wrote: The first thing to try is to take the semi-colon ( ; ) out of the query:

PHP Code:
$auth $this->db->query("CALL sp_authenticate('{$username}')"); 

If that change does not fix the issue or change the error you're receiving, then you may also need to free the result before modifying the session. This should be as simple as calling $auth->free_result() before returning from authenticate_user(), but you'll have to make sure you've retrieved any data you need from the result before doing so.

I have done both as you suggested and still does not change it. I am wondering if there is something in the php.ini I should be looking at for the sessions? Like I said it holds on to the session values I am setting right up until I do the redirect back to the page that submitted the logon. When I check the session values on that page all I get is the session id which matches the last check of the session values at
PHP Code:
var_dump($this->session->all_userdata());
//session_commit();
if (isset($_SESSION['user_id'])) {
... 
I display all of the userdata, then one last check for the $_SESSION['user_id']  Then it redirects. But at the redirected page, the only session variable is the session id which matches the session id from all_userdata() ???
Reply


Messages In This Thread
RE: Commands out of sync; you can't run this command now - by mike7418 - 12-31-2015, 04:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB