Menu

Login/session not shared in left and right

Help
2006-03-30
2013-06-11
  • Nobody/Anonymous

    Development server running:

    PostgreSQL 8.1.2

    Apache/2.0.52 (Unix) mod_ssl/2.0.52 OpenSSL/0.9.7d DAV/2 SVN/1.2.3 PHP/4.3.10

    php './configure' '--with-openssl' '--with-apache2=../httpd-2.0.52' '--enable-trans-sid' '--enable-mm' '--enable-inline-optimization' '--disable-debug' '--with-curl' '--with-pgsql' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mcrypt' '--enable-ftp' '--with-mhash' '--enable-dav' '--with-gd' '--with-zlib-dir=/lib' '--with-jpeg-dir=/usr/lib' '--with-dom-xslt' '--with-dom'

    Browsing phpPgAdmin from a Winxp machine, tried with both Firefox 1.5.0.1 and MSIE 6.0, both producing same results found below:

    I see my only configured server on the left panel. I can click it and log in on the right panel. Everything works, except clicking the left panel to show the tree, will make the right panel go back to the login screen again and the tree doesn't show at all at the left, it remains closed.

    I tried adding my login information into the config.inc.php for fun, like filling out $conf['servers'][0]['username'] and $conf['servers'][0]['password'] (they aren't the config by default now, but I remembered I had them used in earlier versions of phpPgAdmin)

    Seems this might not be supported or anything, but for testing yet it shows a few things. The left panel can be navigated now, without a login needed and now handles the tree without a problem. Pages show on the right panel now as well, though with the following notices on top of the page:

    Notice: Undefined index: host in /home/atp/WWW/phpPgAdmin/classes/Misc.php on line 899

    Notice: Undefined index: port in /home/atp/WWW/phpPgAdmin/classes/Misc.php on line 899

    Problems start again though, if I start navigating right panel now. Then the login screen pops up again and challenges me 2 times before I'm able to successfully log in and after this, the right panel finally works. However, switching back to using left panel tree again, will result in the notices as above and makes me have to do a double login again, whenever I switch back to navigating the right panel again.

    This made me believe there was a problem in sharing the session information between both panels, so I looked up if the uri's in both panels where containing the same session id.

    I assume PPA_ID is used for this? well, the right panel uses this in the uri querystrings, but the left panel doesn't, which is probably causing any clicks in the left creating new sessions, resulting in login details being lost, if not added to the config.inc.php

    Any way I can quickfix this? Or maybe I'm doing something wrong? Or maybe can I hack the SID constant behind uri's somewhere?

    Just wondering, as using the new phpPgAdmin like the way it is now, sure is bugging me a little :)

     
    • Nobody/Anonymous

      Oh bah, after fooling around with this issue for a couple of days before I made above topic, I know finally realised I could easely fix this by making PHP use cookies for sessions again.

      Seems this latest version of PostgreSQL requires cookies in order to work 100%

      because in our development here, we always build everything without using cookies, we have set session.usecookies in php to Off.

      In order for me to make phpPgAdmin to work properly, I've just added ini_set('session.use_cookies', true); to the config.inc.php and all is fine. Probably not the best location for this ini_set, but heh it works anyway :)

      Think it would be nice though, if the SID constant was used for every URI in phpPgAdmin so that it doesn't require session cookies that much.

      Anyway the workaround works, so I'm happy. Never mind all the above :)

       

Log in to post a comment.