Welcome Guest, Not a member yet? Register   Sign In
Session Database Driver and Oracle
#1

Hello everyone.

I'm confused, why Codeigniter 3 does not support Oracle in Session Database Driver. In the official user guide we can read that "Only MySQL and PostgreSQL databases are officially supported, due to lack of advisory locking mechanisms on other platforms." However in Oracle we can find SYS.DBMS_LOCK package, which provides necessary procedures to get and release locks.

I have modified Session_database_driver.php file to support Oracle database. Anyone feel free to use it (and, maybe, to search for bugs?).
The session table should be created like this:
Code:
CREATE TABLE CI_SESSION (
       "id" varchar2(40) NOT NULL,
       "ip_address" varchar2(45) NOT NULL,
       "timestamp" NUMBER DEFAULT 0 NOT NULL,
       "data" CLOB DEFAULT empty_clob() NOT NULL
);

and you need to grant 'execute' privilege on sys.dbms_lock package to desired db user.


.php   Session_database_driver.php (Size: 14.42 KB / Downloads: 344)
Reply
#2

I just tried it and so far it's working well. Cool

Thanks you !
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB