summaryrefslogtreecommitdiff
path: root/ext/sqlite/sqlite.c
diff options
context:
space:
mode:
authorWez Furlong <wez@php.net>2003-07-01 13:07:37 +0000
committerWez Furlong <wez@php.net>2003-07-01 13:07:37 +0000
commit607b6501ed7e896fbbe6039b355c04c64c2b274d (patch)
tree586c3c0d8b85af7e33ca5a87ae930c8fd088a7d4 /ext/sqlite/sqlite.c
parent8cbc0eae75de1c29a4587b07127d34ffd58ddfb1 (diff)
downloadphp-git-607b6501ed7e896fbbe6039b355c04c64c2b274d.tar.gz
Add sqlite session handler.
Modified (quite a bit!) patch from John Coggeshall. It compiles, but it otherwise untested. session.save_path == path to actual database file for the session. eg: session.save_path=/tmp/mysite-session.db
Diffstat (limited to 'ext/sqlite/sqlite.c')
-rw-r--r--ext/sqlite/sqlite.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c
index de60030cf2..9e14e68575 100644
--- a/ext/sqlite/sqlite.c
+++ b/ext/sqlite/sqlite.c
@@ -29,6 +29,7 @@
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
+#include "ext/session/php_session.h"
#include "php_sqlite.h"
#if HAVE_TIME_H
@@ -57,6 +58,9 @@
ZEND_DECLARE_MODULE_GLOBALS(sqlite)
+extern ps_module ps_mod_sqlite;
+#define ps_sqlite_ptr &ps_mod_sqlite
+
extern int sqlite_encode_binary(const unsigned char *in, int n, unsigned char *out);
extern int sqlite_decode_binary(const unsigned char *in, unsigned char *out);
@@ -878,6 +882,8 @@ PHP_MINIT_FUNCTION(sqlite)
REGISTER_INI_ENTRIES();
+ php_session_register_module(ps_sqlite_ptr);
+
le_sqlite_db = zend_register_list_destructors_ex(php_sqlite_db_dtor, NULL, "sqlite database", module_number);
le_sqlite_pdb = zend_register_list_destructors_ex(NULL, php_sqlite_db_dtor, "sqlite database (persistent)", module_number);
le_sqlite_result = zend_register_list_destructors_ex(php_sqlite_result_dtor, NULL, "sqlite result", module_number);