[ic] Mysql session problems

DB DB at M-and-D.com
Mon Aug 24 00:30:16 UTC 2009


Hi - I'm attempting to get Mysql sessions to work following the
instructions I found online. In my catalog.cfg I have:

########################################
Variable MYSQL_SESSIONS_YES 1
Variable SESSION_DSN dbi:mysql:sessiondb:localhost

ifdef MYSQL_SESSIONS_YES
Message Enabling MySQL-based sessions...
SessionType DBI
Database sessions_mysql sessions_mysql.txt __SESSION_DSN__
Database sessions_mysql USER myuser
Database sessions_mysql PASS mypass
Database sessions_mysql KEY code
Database sessions_mysql COLUMN_DEF "code=varchar(64) NOT NULL PRIMARY KEY"
Database sessions_mysql INDEX code
Database sessions_mysql COLUMN_DEF "session=text"
Database sessions_mysql COLUMN_DEF "sessionlock=VARCHAR(64) DEFAULT ''"
Database sessions_mysql COLUMN_DEF "last_accessed=TIMESTAMP(14)"
SessionDB sessions_mysql
Message ...Done
endif

ifndef MYSQL_SESSIONS_YES
Message MySQL-based sessions not enabled.
endif
########################################

Session data indeed appears in the table and most things work. But I get
some "500 Internal Server" errors while using the admin ui. In
/usr/local/interchange/erorr.log I see

[23/August/2009:20:02:52 -0400] test
/cgi-bin/test/admin/content_editor.html Session lock fetch execute
failed: DBD::mysql::st execute failed: MySQL server has gone away at
/usr/local/interchange/lib/Vend/SessionDB.pm line 95.

[23/August/2009:20:02:52 -0400] test
/cgi-bin/test/admin/content_editor.html Died in server spawn:
DBD::mysql::st fetchrow_arrayref failed: fetch() without execute() at
/usr/local/interchange/lib/Vend/SessionDB.pm line 106.


and in the http error.log I see:
[Sun Aug 23 20:02:52 2009] [error] Premature end of script headers:
test, referer:
http://test.mydomain.com/admin/content_editor?mv_session_id=3xFATbZB&mv_pc=3123&ui_name=pagename.html&ui_type=page&ui_return_to=admin/content

If I revert to file based session, all works fine. Does anyone have an
idea what may be happening ?



More information about the interchange-users mailing list