Development

#4473 (Patch: Session with support utf8 and using Propel connection for version 1.1.2)

You must first sign up to be able to contribute.

Ticket #4473 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Patch: Session with support utf8 and using Propel connection for version 1.1.2

Reported by: ingvar Assigned to: fabien
Priority: minor Milestone: 1.2.0
Component: other Version: 1.1.2
Keywords: Cc:
Qualification: Unreviewed

Description

I had some problem with sessions with utf-8 text when save some information to session. sfMySQLDatabase.class.php don't use: "SET NAMES". So I am add 2 patches.

1) sfMySQLDatabase.class.php.patch - add

  @mysql_query("SET NAMES '{$encoding}'", $this->connection);

Using, [databases.yml]:

  session:
    class: sfMySQLDatabase
    param:
      dsn:      'mysql:dbname=demo;host=localhost'
      database: demo
      username: root
      encoding: utf8 # read from here
      password: root
      hostspec: localhost
      host:     localhost

Using [factories.yml]:

all:
  storage:
    class: sfMySQLSessionStorage
    param:
      db_table: sessions
      database: session

2) sfDatabaseSessionStorage.class.php.patch - can use "propel" connection:

Using [factories.yml]:

all:
  storage:
    class: sfPDOSessionStorage
    param:
      db_table: sessions
      database: propel

Attachments

sfMySQLDatabase.class.php.patch (0.6 kB) - added by ingvar on 09/24/08 00:32:04.
sfDatabaseSessionStorage.class.php.patch (0.6 kB) - added by ingvar on 09/24/08 00:32:18.

Change History

09/24/08 00:32:04 changed by ingvar

  • attachment sfMySQLDatabase.class.php.patch added.

09/24/08 00:32:18 changed by ingvar

  • attachment sfDatabaseSessionStorage.class.php.patch added.

11/08/08 12:27:24 changed by FabianLange

  • status changed from new to closed.
  • resolution set to fixed.

(In [12763]) [1.2] applied patch for UTF-8 support and using PropelConnections? for PDOSession storage. fixes #4473

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.