Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony2 configure DB storage sessions
    primarykey
    data
    text
    <p>UPDATE: problem solved, see the comments (many issues, the versions differences was but one of them).</p> <p>I'm trying to configure sessions in Symfony2 in config.yml file. I have the following configuration:</p> <pre><code>session: default_locale: %locale% lifetime: 7200 auto_start: true storage_id: session.storage.pdo parameters: pdo.db_options: db_table: session db_id_col: session_id db_data_col: session_value db_time_col: session_time services: pdo: class: PDO arguments: - "mysql:dbname=%database_name%" - %database_user% - %database_password% session.storage.pdo: class: Symfony\Component\HttpFoundation\SessionStorage\PdoSessionStorage arguments: [@pdo, %session.storage.options%, %pdo.db_options%] </code></pre> <p>It's based on Symfony2's cookbook <a href="http://symfony.com/doc/2.0/cookbook/configuration/pdo_session_storage.html" rel="nofollow">http://symfony.com/doc/2.0/cookbook/configuration/pdo_session_storage.html</a></p> <p>I've created exactly the same table as in the given link.</p> <p>However, it doesn't work. I get some "blank" error (no error message, but "PDO Exception" and "Error Exception"). I admit I have no much knowledge on configuring the Symfony2 or any info (that's why I'm using cookbook). I lost a lot of time and see no much documentation about it in the internet, not mentioning the fact that internet is quite silent about this case (having session storaged to DB table in Symfony2).</p> <p>My NetBeans is "shouting" sth about the last line:</p> <pre><code> arguments: [@pdo, %session.storage.options%, %pdo.db_options%] </code></pre> <p>"ScannerException while scanning for the next token we had this found character @(64) that cannot start any token".</p> <p>UPDATE: Hmm now I'm not sure if it's about the configuration. I can see that Symfony2's cookbook (use... ) example doesn't match actually the file structure in the Symfony2's bundle. In a word, there is no such file-path, but after putting the real one it still doesn't work.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload