File tree Expand file tree Collapse file tree 3 files changed +20
-21
lines changed Expand file tree Collapse file tree 3 files changed +20
-21
lines changed Original file line number Diff line number Diff line change 1+ /nbproject /private /
2+ /nbproject /
Original file line number Diff line number Diff line change @@ -2,3 +2,19 @@ db-sessions
22===========
33
44PHP Database Session Classes
5+
6+ Here are some PHP Session database classes.
7+ I decided to go with PDO. This is a work
8+ in progress.
9+
10+ Installation
11+ ----------------------------
12+
13+ First you need to create a table in your database:
14+
15+ CREATE TABLE `session_handler` (
16+ `id` varchar(255) NOT NULL,
17+ `data` mediumtext NOT NULL,
18+ `timestamp` int(255) NOT NULL,
19+ PRIMARY KEY (`id`)
20+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class SessionHandler implements SessionHandlerInterface {
1616 protected $ session_id = NULL ;
1717 protected $ session_written = FALSE ;
1818
19- const ADMIN_EMAIL = 'it@olwm.com ' ;
19+ const ADMIN_EMAIL = 'admin@domain.tld ' ;
2020
2121 /**
2222 * Automatically sets this instance to database session handler.
@@ -160,23 +160,4 @@ protected function prepare($query) {
160160 return $ this ->dbh ->prepare (sprintf ($ query , $ this ->table ));
161161 }
162162
163- }
164-
165- //class
166-
167- /** PHP MySQL Session Handler
168- ========================
169-
170- Installation
171- ----------------------------
172-
173- First you need to create a table in your database:
174-
175- CREATE TABLE `session_handler` (
176- `id` varchar(255) NOT NULL,
177- `data` mediumtext NOT NULL,
178- `timestamp` int(255) NOT NULL,
179- PRIMARY KEY (`id`)
180- ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
181- *
182- */
163+ }
You can’t perform that action at this time.
0 commit comments