Please Help me..
I install phpmylibrary in AppServ when install complete phpmylibrary show message "Fatal error: Call to a member function Execute() on a non-object in C:\AppServ\www\PhpMyLibrary\polerio\lib\Session2.php on line 378"
How To fix error it
Thank….
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-01-12
Hello, finally i correct this.
Edit function SessionWrite($sessid, $vars) IN 'polerio/lib/Session2.php' adding after
list($pmldbconn) = Polerio::DBGetConn();
this code:
if (!is_object($pmldbconn)) {
Polerio::DBInit();
list($pmldbconn) = Polerio::DBGetConn();
}
My function looks like this:
functionSessionWrite($sessid,$vars){if(!isset($sessid)||!isset($vars)){returnfalse;}list($pmldbconn)=Polerio::DBGetConn();if(!is_object($pmldbconn)){Polerio::DBInit();list($pmldbconn)=Polerio::DBGetConn();}$table=Polerio::DBGetTables();$sessioninfocolumn=&$table['session_info_column'];$sessioninfotable=$table['session_info'];$query="UPDATE $sessioninfotable SET $sessioninfocolumn[vars] = '".Polerio::VarPrepForStore($vars)."', $sessioninfocolumn[lastused] = ".time()." WHERE $sessioninfocolumn[sessid] = '".Polerio::VarPrepForStore($sessid)."'";$pmldbconn->Execute($query);if($pmldbconn->ErrorNo()!=0){returnfalse;}returntrue;}
I thing that somewhere the script close the connection to db but I cannot find where. This trick make things work :-)
Luca
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Please Help me..
I install phpmylibrary in AppServ when install complete phpmylibrary show message "Fatal error: Call to a member function Execute() on a non-object in C:\AppServ\www\PhpMyLibrary\polerio\lib\Session2.php on line 378"
How To fix error it
Thank….
Hello, finally i correct this.
Edit function SessionWrite($sessid, $vars) IN 'polerio/lib/Session2.php' adding after
list($pmldbconn) = Polerio::DBGetConn();
this code:
if (!is_object($pmldbconn)) {
Polerio::DBInit();
list($pmldbconn) = Polerio::DBGetConn();
}
My function looks like this:
I thing that somewhere the script close the connection to db but I cannot find where. This trick make things work :-)
Luca
Almost two years on and your post has resolved this issue for me.
Thanks, Luca.