define('DAEMON_SLEEP_INTERVAL', 120);
// Interval between update daemon update runs
+ define('DATABASE_BACKED_SESSIONS', true);
+ // Store session information in a database (recommended)
+ // Uses default PHP session storing mechanism if disabled
+
// vim:ft=php
?>
foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE,
foreign key (feed_id) references ttrss_feeds(id) ON DELETE CASCADE) TYPE=InnoDB;
-create table ttrss_sessions (int_id integer not null primary key auto_increment,
- id varchar(300) unique not null,
+create table ttrss_sessions (id varchar(300) unique not null primary key,
data text,
expire integer not null,
index (id),
feed_id integer default null references ttrss_feeds(id) ON DELETE CASCADE,
entered timestamp not null default NOW());
-create table ttrss_sessions (int_id serial not null primary key,
- id varchar(300) unique not null,
- data text,
- expire integer not null);
+create table ttrss_sessions (id varchar(300) unique not null primary key,
+ data text,
+ expire integer not null);
-create index ttrss_sessions_id_index on ttrss_sessions(id);
create index ttrss_sessions_expire_index on ttrss_sessions(expire);
commit;
alter table ttrss_entries change author author varchar(250) not null;
alter table ttrss_entries alter column author set default '';
-create table ttrss_sessions (int_id integer not null primary key auto_increment,
- id varchar(300) unique not null,
+create table ttrss_sessions (id varchar(300) unique not null primary key,
data text,
expire integer not null,
index (id),
alter table ttrss_entries alter column author set not null;
alter table ttrss_entries alter column author set default '';
-create table ttrss_sessions (int_id serial not null primary key,
- id varchar(300) unique not null,
- data text,
- expire integer not null);
+create table ttrss_sessions (id varchar(300) unique not null primary key,
+ data text,
+ expire integer not null);
create index ttrss_sessions_id_index on ttrss_sessions(id);
create index ttrss_sessions_expire_index on ttrss_sessions(expire);
$session_expire = 600;
ini_set("session.gc_probability", 50);
+ ini_set("session.name", "ttrss_sid");
function open ($s, $n) {
db_query($session_connection, $query);
}
- session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
+ if (DATABASE_BACKED_SESSIONS) {
+ session_set_save_handler ("open", "close", "read", "write", "destroy", "gc");
+ }
+
session_start();
?>