note 120283 rejected from function.session-set-save-handler by sobak
| From: | sobak@php.net | Date: | Wed, 07 Dec 2016 07:17:23 +0000 |
| Subject: | note 120283 rejected from function.session-set-save-handler by sobak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208240@lists.php.net to get a copy of this message | ||
Note Submitter: xcardinx at gmail dot com
----
I am encountering error:
SQL query:
class SESSION { FUNCTION __construct(
){session_set_save_handler(
array(
$this, 'open'
), array(
$this, 'close'
), array(
$this, 'read'
), array(
$this, 'write'
), array(
$this, 'destroy'
), array(
$this, 'gc'
));
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL
server version for the right syntax to use near 'class session
{
function __construct()
{
session_set_save_handler(array($t' at line 1
My sql:
Run SQL query/queries on database
class session
{
function __construct()
{
session_set_save_handler(array($this, 'open'), array($this, 'close'),
array($this, 'read'), array($this, 'write'), array($this, 'destroy'),
array($this, 'gc'));
register_shutdown_function('session_write_close');
}
Note: I've done research about MySQL Error 1064 and went to different site including:
http://stackoverflow.com/questions/13963811/session-set-save-handler-not-setting
I am unable to fix the problem and I need help