I'm having a different issue with sfMySQLSessionStorage and/or
sfPDOSessionStorage in 1.2-DEV
Using sfPDOSessionStorage the error is:
Fatal error: Call to a member function prepare() on a non-object in /
usr/local/lib/sf/1.2.0-DEV/lib/storage/sfPDOSessionStorage.class.php
on line 109
Using sfMySQLSessionStorage the error is:
Warning: mysql_real_escape_string() expects parameter 2 to be
resource, null given in /usr/local/lib/sf/1.2.0-DEV/lib/storage/
sfMySQLSessionStorage.class.php on line 182
These errors occur with the following configuration, and sessions are
being stored in the same database as the application:
# config/databases.yml
dev:
propel:
param:
classname: DebugPDO
all:
propel:
class: sfPropelDatabase
param:
classname: PropelPDO
dsn: mysql:dbname=db;host=localhost
phptype: mysql
username: username
password: password
encoding: utf8
persistent: false
pooling: false
# apps/frontend/config/factories.yml
all:
storage:
class: sfPDOSessionStorage (or sfMySQLSessionStorage)
param:
session_name: symfony
db_table: sessions
database: propel
db_id_col: sess_id
db_data_col: data
db_time_col: time
Any pointers are greatly appreciated!
Ben
On Aug 29, 11:14 am, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I just found out a bug in sfMySQLSessionStorage [1] , the session_time
> use the mysql 'NOW()' function and before it was using php time().
>
> Now the problem is most of snippets ( [2], [3]) found on the web to
> used sfMySQLSessionStorage, use bigint to store the sess_time and not
> a date field.
>
> So instead of saving '2008-05-06', it saved '2008'. and before the
> revision it was '1206893684' (unix timestamp)
>
> So websites using bigint for sess_time fields will not have their
> sessions deleted
>
> [1]http://trac.symfony-project.org/changeset/8664
> [2]http://www.symfony-project.org/snippets/snippet/26
> [3]http://www.symfony-project.org/forum/index.php/m/20549/
>
> --
> Thomas Rabaix
> Internet Consultant
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---