PEAK XOOPS - Users Login To be Taken back to Guest Login in englishin japanese

Users Login To be Taken back to Guest Login

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 .2 .3 .4 .5 | Posted on 2009/1/30 6:18
auxiv  ¸àĹ   Posts: 42
Hi GiJoe,

I am having problems with people not being able to login properly. Some can login using another browser, though most dont try. You mentioned before : Quote:
(3) cookie problem (4) Protector's setting 'Protected IP bits for the session'

how can I fix the ip bits for the session?

how can I go about fixing a possible cookie problem?

do I have to assign cookie paths to assure cookies are being used properly?

Please help!!

thank you much in advance!

auxiv
Votes:7 Average:8.57
Previous post - Next post | Parent - Children.1 | Posted on 2009/1/30 13:10
onasre  ¾åÅùʼ   Posts: 38
i dont think it is Protector problem . Try one Of this Methods :

1- Open file session.php found at /Xoops/kernel/session.php

Change line 80 var $enableRegenerateId = false;

to var $enableRegenerateId = true;


if it didt work go to step 2

2- Embty the Table _session and protector_access from database . you can write a php code to make cron file to everyday or every hour embty the table somthing like this code .

<?php
MYSQL_CONNECT('localhost,'dbuser,'password');
@mysql_select_db("dbname") or die(mysql_error());
// The Name of the Tables to embty
$query="TRUNCATE xoops_session";
$query="TRUNCATE xoops_protector_access";

mysql_query($query);
mysql_close()
?>

dont forget change the server name and username and password and db name and the tables name from the code above..

Good luck
Votes:9 Average:8.89
Previous post - Next post | Parent - No child | Posted on 2009/2/8 13:05
auxiv  ¸àĹ   Posts: 42
I am using XCL (latest). There is no 'enableRegenerateId' on line 80 in session.php. I searched the complete XCL for any 'enableRegenerateId' enteries and nothing came up.

I have a session class in preload that sends session files to a directory instead of database.

Thank you for the cron information by the way, it is useful info.

I do not know why only a few members can *not* log in with internet explorer. Maybe its their security setting in their browser? certain antivirus maybe?
the log in problem never happens to me, is very difficult for me to track. They usually get discouraged and leave the site.

must have something to do with the cookies, although im not sure.

in any event, thanks for helping me with this.
Votes:10 Average:8.00
Previous post - Next post | Parent - No child | Posted on 2009/2/8 16:56 | Last modified
onasre  ¾åÅùʼ   Posts: 38
In your XOOPS directory: /kernel/session.php around line 80

change:
var $enableRegenerateId = true;
to:
var $enableRegenerateId = false;

but if u use xoops 2.32b this change already fixed ..

try enable debug mode and see wht error u get..
Votes:10 Average:8.00
Previous post - Next post | Parent - No child | Posted on 2009/2/9 4:58 | Last modified
auxiv  ¸àĹ   Posts: 42
hi,

I am using Legacy_2_1_6.

here are the contents of /kernel/session.php

class XoopsSessionHandler
{

    /**
     * Database connection
     *
     * @var	object
     * @access	private
     */
    var $db;

    /**
     * Constructor
     *
     * @param	object  &$mf    reference to a XoopsManagerFactory
     *
     */
    function XoopsSessionHandler(&$db)
    {
        $this->db =& $db;
    }

    /**
     * Open a session
     *
     * @param	string  $save_path
     * @param	string  $session_name
     * 
     * @return	bool
     */
    function open($save_path, $session_name)
	{
        return true;
    }

    /**
     * Close a session
     * 
     * @return	bool
     */
    function close()
	{
        return true;
    }

    /**
     * Read a session from the database
     *
     * @param	string  &sess_id    ID of the session
     *
     * @return	array   Session data
     */
    function read($sess_id)
	{
        $sql = sprintf('SELECT sess_data FROM %s WHERE sess_id = %s', $this->db->prefix('session'), $this->db->quoteString($sess_id));
        if (false != $result = $this->db->query($sql)) {
            if (list($sess_data) = $this->db->fetchRow($result)) {
                return $sess_data;
            }
        }
        return '';
    }

    /**
     * Write a session to the database
     *
     * @param   string  $sess_id
     * @param   string  $sess_data
     *
     * @return  bool    
     **/
    function write($sess_id, $sess_data)
	{
		$sess_id = $this->db->quoteString($sess_id);
		list($count) = $this->db->fetchRow($this->db->query("SELECT COUNT(*) FROM ".$this->db->prefix('session')." WHERE sess_id=".$sess_id));
        if ( $count > 0 ) {
			$sql = sprintf('UPDATE %s SET sess_updated = %u, sess_data = %s WHERE sess_id = %s', $this->db->prefix('session'), time(), $this->db->quoteString($sess_data), $sess_id);
        } else {
			$sql = sprintf('INSERT INTO %s (sess_id, sess_updated, sess_ip, sess_data) VALUES (%s, %u, %s, %s)', $this->db->prefix('session'), $sess_id, time(), $this->db->quoteString($_SERVER['REMOTE_ADDR']), $this->db->quoteString($sess_data));
        }
		if (!$this->db->queryF($sql)) {
            return false;
        }
		return true;
    }

    /**
     * Destroy a session
     * 
     * @param   string  $sess_id
     * 
     * @return  bool
     **/
    function destroy($sess_id)
    {
		$sql = sprintf('DELETE FROM %s WHERE sess_id = %s', $this->db->prefix('session'), $this->db->quoteString($sess_id));
        if ( !$result = $this->db->queryF($sql) ) {
            return false;
        }
        return true;
    }

    /**
     * Garbage Collector
     *
     * @param   int $expire Time in seconds until a session expires
	 * @return  bool
     **/
    function gc($expire)
    {
        $mintime = time() - intval($expire);
		$sql = sprintf('DELETE FROM %s WHERE sess_updated < %u', $this->db->prefix('session'), $mintime);
        return $this->db->queryF($sql);
    }
}

there is no $enableRegenerateId

should i add it? is there an alternative way to toggle this function?

thank you very much again for your time and wisdom
Votes:14 Average:5.71
Previous post - Next post | Parent - Children.1 | Posted on 2009/2/9 13:21 | Last modified
onasre  ¾åÅùʼ   Posts: 38
i'm sorry but i never used Legacy i cant help you with this one , seem bug the developer should look at , it clear the problem with the cookies , Micrsoft Explorer 7 has some issues witht he Cookies .

For temporary Solution i suggest u use cron file to embty the Session table every Hour ..
Votes:9 Average:8.89
Previous post - Next post | Parent - No child | Posted on 2009/2/9 14:54 | Last modified
auxiv  ¸àĹ   Posts: 42
thank you for your suggestions.

will have sessions cleared through cron frequently.
thanks again.
Votes:9 Average:8.89
Previous post - Next post | Parent - Children.1 | Posted on 2009/2/27 14:01
auxiv  ¸àĹ   Posts: 42
this has been resolved by GIJOE.

the only remaining problems were just cached, now no problems.

thank you GIJoe
Votes:13 Average:6.92
Previous post - Next post | Parent - No child | Posted on 2009/4/3 12:39
GIJOE  ÀèǤ·³Áâ   Posts: 4110
I cannot read full of your messages, sorry.

Is there some problems with logging into XCL2.1 still?
Votes:5 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!