This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » legacy support » symfony 1.1 » [SOLVED] sfPDOSessionStorage does not work after upgrade to sf1.1
[SOLVED] sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55154] Mon, 30 June 2008 11:41 Go to next message
botulotoxin  is currently offline botulotoxin
Messages: 13
Registered: June 2008
Location: Brno, Czech Republic
Junior Member
Hi,

first, I'd like to thank all developers and whole comunity for this great framework. Keep up good work.

My problem:
I've just upgraded to final sf1.1 from RC2 and storing sessions in DB doesn't work any more. I'm getting fatal error on each request
Fatal error: Call to a member function prepare() on a non-object in /usr/share/php/symfony/storage/sfPDOSessionStorage.class.php on line 107

I've upgraded symfony via pear and then ran project:upgrade in my project directory. When I downgrade back to RC2, everything works fine. When I switch to sfSessionStorage in factories.yml, it also works (but session isn't stored in db, of course).

Does anybody have similar problem?
Thanks for help

[Updated on: Mon, 30 June 2008 15:33]

Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55156 is a reply to message #55154 ] Mon, 30 June 2008 11:48 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
Change all $this->db->... to $this->con->... in sfPDOSessionStorage
I already raised a ticket.

Michael
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55159 is a reply to message #55156 ] Mon, 30 June 2008 11:59 Go to previous messageGo to next message
botulotoxin  is currently offline botulotoxin
Messages: 13
Registered: June 2008
Location: Brno, Czech Republic
Junior Member
That was fast. Thank you =]

Zdenek
Re: [SOLVED] sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55160 is a reply to message #55154 ] Mon, 30 June 2008 12:21 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
Please check also, if you can login in your application.

Michael
Re: [SOLVED] sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55164 is a reply to message #55160 ] Mon, 30 June 2008 12:35 Go to previous messageGo to next message
botulotoxin  is currently offline botulotoxin
Messages: 13
Registered: June 2008
Location: Brno, Czech Republic
Junior Member
No, I can't login.

factories.yml
all:
  storage:
    class: sfPDOSessionStorage
    param:
      session_name: symfony
      database: propel
      db_table: sf_session_storage
      db_id_col: sess_id
      db_data_col: sess_data
      db_time_col: sess_time


databases.yml
dev:
  propel:
    param:
      classname: DebugPDO

all:
  propel:
    class: sfPropelDatabase
    param:
      dsn: pgsql:dbname=mydatabase;host=localhost
      username: ***
      password: ***
      encoding: utf8
      persistent: true
      pooling: false
      classname: PropelPDO
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55165 is a reply to message #55154 ] Mon, 30 June 2008 12:38 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
Thanks,

i created a ticket:
http://trac.symfony-project.com/ticket/3857

This is only a workaround, try to comment out this line:
http://trac.symfony-project.com/browser/branches/1.1/lib/use r/sfBasicSecurityUser.class.php#L192

Michael
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55169 is a reply to message #55165 ] Mon, 30 June 2008 12:52 Go to previous messageGo to next message
botulotoxin  is currently offline botulotoxin
Messages: 13
Registered: June 2008
Location: Brno, Czech Republic
Junior Member
I had to comment also line 114 to get this working.

Zdenek
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55171 is a reply to message #55154 ] Mon, 30 June 2008 13:00 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
botulotoxin wrote on Mon, 30 June 2008 11:41

Hi,

first, I'd like to thank all developers and whole comunity for this great framework. Keep up good work.

My problem:
I've just upgraded to final sf1.1 from RC2 and storing sessions in DB doesn't work any more. I'm getting fatal error on each request
Fatal error: Call to a member function prepare() on a non-object in /usr/share/php/symfony/storage/sfPDOSessionStorage.class.php on line 107

I've upgraded symfony via pear and then ran project:upgrade in my project directory. When I downgrade back to RC2, everything works fine. When I switch to sfSessionStorage in factories.yml, it also works (but session isn't stored in db, of course).

Does anybody have similar problem?
Thanks for help


It seeems that it is related to the new sfPropelPlugin (1.3) since i'm using it too.

Michael
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55174 is a reply to message #55156 ] Mon, 30 June 2008 13:26 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
michael.piecko wrote on Mon, 30 June 2008 11:48

Change all $this->db->... to $this->con->... in sfPDOSessionStorage
I already raised a ticket.

Michael


Update:
One thing you can do without modifying the source is to setup a second connection in database.yml and use it in your session (factories.yml). This connection should use the sfPDODatabase class.

More here (Comments):
http://trac.symfony-project.com/ticket/3856

Michael
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55176 is a reply to message #55174 ] Mon, 30 June 2008 14:08 Go to previous messageGo to next message
botulotoxin  is currently offline botulotoxin
Messages: 13
Registered: June 2008
Location: Brno, Czech Republic
Junior Member
Thanks for your help. But it's still not working for me. I read also comments on your ticket.
I can use original sfPDOSessionStorage (with second connection) but I still have to comment out regenerate lines in sfBasicSecurityUser. Otherwise I can't login.

Zdenek
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55177 is a reply to message #55154 ] Mon, 30 June 2008 14:12 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
This issue will be fixed with symfony 1.1.1:
http://trac.symfony-project.com/ticket/3857 (see comments)

Michael
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #55179 is a reply to message #55177 ] Mon, 30 June 2008 14:19 Go to previous messageGo to next message
botulotoxin  is currently offline botulotoxin
Messages: 13
Registered: June 2008
Location: Brno, Czech Republic
Junior Member
Ok, thank you again.

Zdenek
Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #59390 is a reply to message #55177 ] Mon, 25 August 2008 18:34 Go to previous messageGo to next message
larsf  is currently offline larsf
Messages: 22
Registered: June 2008
Location: Stuttgart / Germany
Junior Member

I upgraded to symfony 1.1.1, but the same issue (as described in the above posts) still exists over here. Anyone with the same problem in 1.1.1?


EDIT:

In order to get the database-based session storage working, I had to:

- change all occurences of "$this->db" to "$this->con" as described above

- manually create the sessions table, as described at http://www.lampjunkie.com/2008/05/store-symfony-sessions-in- database-with-propel/

Seems like the bug was not really fixed in symfony 1.1.1 or the upgrade did not work properly... Rolling Eyes


Hope it helps someone, Smile
Lars.

[Updated on: Tue, 26 August 2008 10:24]

Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #65791 is a reply to message #59390 ] Sun, 23 November 2008 01:09 Go to previous messageGo to next message
insaini  is currently offline insaini
Messages: 42
Registered: August 2008
Location: Brampton, ON
Member
wow this is pretty ridiculous that this hasnt been fixed yet. I am using doctrine. But it was pretty simple.. all that was needed was for the sfPDOSessionStorage class to have all instances of $this->db replaced with $this->con .. why hasnt this been fixed yet?

Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #65797 is a reply to message #65791 ] Sun, 23 November 2008 11:06 Go to previous messageGo to next message
michael.piecko  is currently offline michael.piecko
Messages: 624
Registered: June 2006
Location: Germany
Faithful Member
Is it so hard to ask a question without any harsh words?

Michael

insaini wrote on Sun, 23 November 2008 01:09

wow this is pretty ridiculous that this hasnt been fixed yet. I am using doctrine. But it was pretty simple.. all that was needed was for the sfPDOSessionStorage class to have all instances of $this->db replaced with $this->con .. why hasnt this been fixed yet?


Re: sfPDOSessionStorage does not work after upgrade to sf1.1 [message #65798 is a reply to message #65797 ] Sun, 23 November 2008 11:18 Go to previous message
insaini  is currently offline insaini
Messages: 42
Registered: August 2008
Location: Brampton, ON
Member
I do apologize. I didnt realize ridiculous was a harsh word and no thats not sarcasm.
Previous Topic:[SOLVED] Some trivial data missing in fr.dat, ticket raised but unanswered - what to do?
Next Topic:How to translate admin generator
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software