Closed (fixed)
Project:
Session expire
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Sep 2011 at 11:52 UTC
Updated:
1 Dec 2012 at 14:15 UTC
Jump to comment: Most recent file
Going to the admin page in a Drupal + Oracle configuration i get:
PDOException: SELECT FROM {sessions} sessions (prepared: SELECT FROM "SESSIONS" sessions ) e: SQLSTATE[HY000]: General error: 936 OCIStmtExecute: ORA-00936: missing expression (/opt/workspace/php-5.3.6/ext/pdo_oci/oci_statement.c:148) args: Array ( ) in session_expire_settings() (line 38 of /opt/workspace/drupal/sites/all/modules/session_expire/session_expire.module).
In session_expire.module on line 38 we have.
<?php
// We want a count
$query = db_select('sessions') ->execute();
$session_count = $query->countQuery();
?>
For compatibility(i'm not sure this works with mysql either) this should be changed to:
<?php
$session_count = db_select('sessions')
->countQuery()
->execute()
->fetchField();
?>
I will add a patch for this.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | session_count-1292136-2.patch | 706 bytes | laurentchardin |
| #1 | session_count-1292136-1.patch | 543 bytes | sionescu |
Comments
Comment #1
sionescu commentedComment #2
sionescu commentedComment #3
laurentchardin commented+1 on this one... Because this query also crashes with MySQL.
This patch needs to be integrated.
Comment #4
laurentchardin commentedPatch rebased.
Comment #5
laurentchardin commentedPatch merged in dev.