6.0.0-alpha12
6/6/25

[#533] oci8 sessionhandler
Summary oci8 sessionhandler
Queue Horde Base
Queue Version 2.2.5
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers (at)
Requester trent.hornibrook (at) gmail (dot) com
Created 09/02/2004 (7582 days ago)
Due
Updated 09/04/2004 (7580 days ago)
Assigned 09/03/2004 (7581 days ago)
Resolved 09/03/2004 (7581 days ago)
Milestone
Patch No

History
09/04/2004 10:09:21 AM Jan Schneider Comment #6 Reply to this comment
I don't think that using DB would be a good idea, even it was 
possible. We have so many native session handlers because performance 
is an important issue here.



If DB supports BLOB handling (I'm pretty sure it doesn't), it might be 
implemented in the DB session handler though.
09/03/2004 02:46:05 PM Chuck Hagenbuch Comment #5
State ⇒ Resolved
Reply to this comment
I've fixed the SQL syntax and added an oracle-specific sessionhandler 
table creation script. Last I checked, DB didn't handle blobs; if you 
could test it and suggest a way of doing it through PEAR DB, that'd be 
great. Maybe a prepare/execute would do it?
09/03/2004 08:41:44 AM Jan Schneider Assigned to Horde DevelopersHorde Developers
State ⇒ Assigned
 
09/03/2004 04:07:29 AM trent (dot) hornibrook (at) gmail (dot) com Comment #4 Reply to this comment
Also the sessionhandler.sql is incorrect for oci8 as oracle doesnt have

a LONGBLOB or IMAGE datatype



/horde/scripts/db

$ cat sessionhandler.sql

-- $Horde: horde/scripts/db/sessionhandler.sql,v 1.2.2.1 2003/01/16 
20:14:49 slusarz Exp $



CREATE TABLE horde_sessionhandler (

     session_id             VARCHAR(32) NOT NULL,

     session_lastmodified   INT NOT NULL,

     session_data           LONGBLOB,

-- Or, on some DBMS systems:

--  session_data           IMAGE,



     PRIMARY KEY (session_id)

);



GRANT SELECT, INSERT, UPDATE, DELETE ON horde_sessionhandler TO horde;



---------



I have set mine to:



CREATE TABLE horde_sessionhandler (

     session_id             VARCHAR(32) NOT NULL,

     session_lastmodified   INT NOT NULL,

     session_data           BLOB,

     PRIMARY KEY (session_id)

);



GRANT SELECT, INSERT, UPDATE, DELETE ON horde_sessionhandler TO horde;
09/03/2004 04:04:33 AM trent (dot) hornibrook (at) gmail (dot) com Comment #3 Reply to this comment
This is how it should read:



document_root/horde/lib

$ diff SQL.php SQL.php.orig

152c152

<                                   sprintf('SELECT %s FROM %s WHERE 
%s FOR UPDATE',

---
                                   sprintf('SELECT %s FROM %s FOR 
UPDATE WHERE %s',
ala: select x from y where z for update not

select x from y for update where z.



Though I guess you would also want to move towards PEAR's DB and that way you

wouldnt need to worry about this.








09/02/2004 08:08:33 AM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
How does it correctly look like?
09/02/2004 07:08:56 AM trent (dot) hornibrook (at) gmail (dot) com Comment #1
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ oci8 sessionhandler
Queue ⇒ Horde Base
Reply to this comment


The oci8 sessionhandler does not appear to work at all.



I'm running

php-4.3.2-11.1.ent

httpd-2.0.46-32.ent.3

oracle-9.2.0.4



When attempting to log in:



Warning: ociexecute(): OCIStmtExecute: ORA-00933: SQL command not 
properly ended in /export/san_mail/htdocs/horde/lib/SQL.php on line 157



Warning: ocifetchinto(): OCIFetchInto: ORA-24374: define not done 
before fetch or execute and fetch in 
/export/san_mail/htdocs/horde/lib/SQL.php on line 158



Fatal error: Call to a member function on a non-object in 
/export/san_mail/htdocs/horde/lib/SQL.php on line 159



Warning: Unknown(): A session is active. You cannot change the session 
module's ini settings at this time. in Unknown on line 0





SQL.php attemps to run this sql:

SELECT session_data FROM horde_sessionhandler FOR UPDATE WHERE 
session_id = 'xxxxxxxxxxxxxxxxxxxxxxxx'





which is just syntactically incorrect in oracle 9.


Saved Queries