Hello Miles,
you wrote:
> I was reading through the mail archives trying to see what has been
> discussed on sessioning. From what I can gather midgard itself does
> not support it. I�m I right on this one? Also it looks like phplib
> might be my best bet for doing this, I know that there are some other
> ways such as mod_sessions.
Midgard support simple form of sessioning by allowing to attach
preferences to user records.
> Another question I had about phplib was what Kristian
> K�hntopp had to say about it.
> PHPLIB usually assumes that you store the PHPLIB tables with the
> application tables. This is because PHP is severly broken in how
> it handles database connects: PHP silently reuses database
> connections
> if you connect parameters match preceding connect parameters. That is
> $l = mysql_connect("a", "b", "c");
> $m = mysql_connect("a", "b", "c");
> will create a single shared database connection and not two distinct
> connections as many will instinctively assume. This is particularly
> nasty if you
> $db = new DB_Midgard;
> $db2 = new DB_Application;
> and both the Midgard and Application database are being connected
> using the name host, user and password parameters. In this case you
> will have two distinct objects, but both will share a single database
> connection.
> Sharing a database connection would be harmless, if this connection
> had no state. As it is, MySQL database connections have a state, the
> current database as selected with mysql_select_db. Other database
> connections have state, too: The currently open transaction. So it
> is in my eyes a design error to treat this as stateless and reuse
> and share it, but somehow the Powers That Be do not seem to
> understand
> me.
> The PHPLIB recommendation is to pack everything, PHPLIB tables,
> Application tables and Midgard tables, into a single database and
> not switch database at all.
> So I�m assuming the easiest way is to put the PHPLIB tables inside
> the midgard database? Is there anything else I should know before I
> jump into this?
First, Midgard's connection to DB is opened and controlled by
mod_midgard module for Apache, not by PHP any functions. PHP could be
even compiled without any DB support and still will be usable within
Midgard, so you either should extend Midgard core or use user
preferences that we already have. Or wait 1.4 which will include
additional extendable records support.
Best regards,
Alexander mailto:[EMAIL PROTECTED]
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]