[pmwiki-devel] session_start problem

marc gmane at auxbuss.com
Mon Dec 4 13:27:08 CST 2006

This is one of those "Doctor, it hurts when I do this.", "Well, don't do 
it then" problems.

I have a site with a cart. The cart object is stored as a session 
variable. It all works fine.

The site uses authuser with a recipe to check users against a MySQL db 
(using ADOdb lite and the Database Standard). This also all works fine.

Someone can add items to the cart, login, and the cart data remains 

Now, I've added a hook to function AuthUserDatabase(), so that I can 
setup a user object and populate it as soon as the user is 
authenticated. This object is also stored as a session variable.

So, once logged in, we have the usual PmWiki session variables, a cart 
object session variable and a user object session variable. 

All that the login script does is:

  function LoggedIn ($userName) {
    $member =& $_SESSION['member'];
    if(!is_object($member)) $member = new Member($userName);

The problem is that when session_start() is performed, the cart session 
variable disappears, and with it the displayed cart. But, when I comment 
out session_start(), everything behaves as normal.

I don't expect a solution, but does anyone have any ideas where the 
problem might potentially lie? Thanks.


More information about the pmwiki-devel mailing list