6.0.0-git
2019-03-23

[#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 2004-09-02 (5315 days ago)
Due
Updated 2004-09-04 (5313 days ago)
Assigned 2004-09-03 (5314 days ago)
Resolved 2004-09-03 (5314 days ago)
Milestone
Patch No

History
2004-09-04 10:09:21 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.
2004-09-03 14:46:05 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?
2004-09-03 08:41:44 Jan Schneider State ⇒ Assigned
Assigned to Horde DevelopersHorde Developers
 
2004-09-03 04:07:29 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;
2004-09-03 04:04:33 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.








2004-09-02 08:08:33 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
How does it correctly look like?
2004-09-02 07:08:56 trent (dot) hornibrook (at) gmail (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
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