Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

There was no user found with your session ticket

Newbie Spellweaver
Joined
Aug 22, 2012
Messages
41
Reaction score
5
Hi,

When the client loads on my novaCMS client, I get an error: There was no user found with your session ticket.

I am using Butterfly Emulator. My SWFs are set up; it's just that I can't figure out how to set up SSO. I heard Butterfly gets SSO tickets from the user_tickets table, and novaCMS does that, as the client source shows the ticket set in the table.

How would I go about solving this issue? Thanks.
 
Web & Interaction Design
Loyal Member
Joined
Dec 18, 2010
Messages
1,506
Reaction score
712
Is your client creating a ticket and posting it to the user_tickets table with the user's ID, each time the user loads the client?
 
Upvote 0
Newbie Spellweaver
Joined
Aug 22, 2012
Messages
41
Reaction score
5
Is your client creating a ticket and posting it to the user_tickets table with the user's ID, each time the user loads the client?

It does seem to, but I don't think the tickets match; it changes on both the client and in the database every time the client is loaded.

YGFp6 - There was no user found with your session ticket - RaGEZONE Forums

qZhXo - There was no user found with your session ticket - RaGEZONE Forums


Here is the function, if it matters:

Code:
    public function createTicket()
    {
        /*
         *  We need to create a session ticket.
         *  Although, before this is done, we 
         *  need to check to see which server
         *  they're using.
         */

        /*
         *  Generate a random ticket.
         *  ---- This must be completely random.
         */
        global $db;

        $ticket = "";
        $ticket .= $this->username."-";
        $ticket .= rand(1000, 9999) . "-";
        $ticket .= rand(1000, 9999) . "-";
        $ticket .= rand(1000, 9999) . "-";
        $ticket .= rand(1000, 9999) . "-";
        $ticket .= rand(1000, 9999);

        if(Config::Read('system.emulator') == 'Phoenix')
        {
            /*
             *  Create a Phoenix session ticket
             */

            $process = $this->write("auth_ticket", $ticket);

        }
        elseif(Config::Read('system.emulator') == 'Butterfly')
        {
            $exists = $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);
            $num = $db->numrows($exists);
            if($num != 0)
            {
                $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);
            }
            else
            {
                $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");

            }
        }
        elseif(Config::Read('system.emulator') == 'Uber')
        {
            /*
             *  Create an Uber session ticket
             *  --- This includes Project Foot.
             */
        }

        return $ticket;
    }
 

Attachments

You must be registered for see attachments list
Upvote 0
BFH Experience Loader
Joined
Oct 27, 2007
Messages
464
Reaction score
52
PHP:
    public function createTicket()    {        /*         *  We need to create a session ticket.         *  Although, before this is done, we          *  need to check to see which server         *  they're using.         */
        /*         *  Generate a random ticket.         *  ---- This must be completely random.         */        global $db;
        $GENERATE = "";        $GENERATE .= $this->username."-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999);	$ticket = $GENERATE;
        if(Config::Read('system.emulator') == 'Phoenix')        {            /*             *  Create a Phoenix session ticket             */
            $process = $this->write("auth_ticket", $ticket);
        }        elseif(Config::Read('system.emulator') == 'Butterfly')        {            $exists = $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);            $num = $db->numrows($exists);            if($num != 0)            {                $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);            }            else            {                $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");
            }        }        elseif(Config::Read('system.emulator') == 'Uber')        {            /*             *  Create an Uber session ticket             *  --- This includes Project Foot.             */        }
        return $ticket;    }


Try this...
 
Upvote 0
Newbie Spellweaver
Joined
Aug 22, 2012
Messages
41
Reaction score
5
PHP:
    public function createTicket()    {        /*         *  We need to create a session ticket.         *  Although, before this is done, we          *  need to check to see which server         *  they're using.         */
        /*         *  Generate a random ticket.         *  ---- This must be completely random.         */        global $db;
        $GENERATE = "";        $GENERATE .= $this->username."-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999) . "-";        $GENERATE .= rand(1000, 9999);	$ticket = $GENERATE;
        if(Config::Read('system.emulator') == 'Phoenix')        {            /*             *  Create a Phoenix session ticket             */
            $process = $this->write("auth_ticket", $ticket);
        }        elseif(Config::Read('system.emulator') == 'Butterfly')        {            $exists = $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);            $num = $db->numrows($exists);            if($num != 0)            {                $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);            }            else            {                $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");
            }        }        elseif(Config::Read('system.emulator') == 'Uber')        {            /*             *  Create an Uber session ticket             *  --- This includes Project Foot.             */        }
        return $ticket;    }


Try this...

I don't see the difference there except adding an extra variable which is still the same as $GENERATE.
 
Upvote 0
BFH Experience Loader
Joined
Oct 27, 2007
Messages
464
Reaction score
52
Because you use the $ticket, but $ticket do every time the rand ;)
So I save the rand in a extra Variable ;)
 
Upvote 0
Newbie Spellweaver
Joined
Aug 22, 2012
Messages
41
Reaction score
5
Nope, still didn't work. It first sets a new ticket when the client is opened, and then once the client is about half-way loaded it assigns another ticket. Not sure why it does that; I'll have to look into it.

Here's every occurrence of "ticket" in the CMS:

Code:
./client.php:$tpl->bind_param("ticket", $user->createTicket());
./application/libraries/user.class.php:    public function createTicket()
./application/libraries/user.class.php:         *  We need to create a session ticket.
./application/libraries/user.class.php:         *  Generate a random ticket.
./application/libraries/user.class.php:        $ticket = $GENERATE;
./application/libraries/user.class.php:             *  Create a Phoenix session ticket
./application/libraries/user.class.php:            $process = $this->write("auth_ticket", $ticket);
./application/libraries/user.class.php:            $exists = $db->query("SELECT * FROM user_tickets WHERE userid = ".$this->id);
./application/libraries/user.class.php:                $db->query("UPDATE user_tickets SET sessionticket = '".$ticket."' WHERE userid = ".$this->id);
./application/libraries/user.class.php:                $db->query("INSERT into user_tickets VALUES(".$this->id.", '".$ticket."', '".$_SERVER['REMOTE_ADDR']."')");
./application/libraries/user.class.php:             *  Create an Uber session ticket
./application/libraries/user.class.php:        return $ticket;
./application/handlers/register.php:            //INSERT INTO `users` (`username`, `real_name`, `password`, `mail`, `auth_ticket`, `credits`, `activity_points`, `activity_points_lastupdate`, `look`, `motto`, `last_online`, `ip_last`) VALUES ('Leon3', 'Leon Hartley', '".$password."', '".$email."', '', ".$habbo->starter_credits.", 1000, 1341150858.12091, 'ch-210-62.hd-190-1.lg-275-62.sh-290-62.hr-115-31', 'I\'m new!', '0', '".$_SERVER['REMOTE_ADDR']."', '".$_SERVER['REMOTE_ADDR']."', ".$habbo->homeroom.");
./application/templates/nova/client.tpl:            "use.sso.ticket" : "1", 
./application/templates/nova/client.tpl:            "sso.ticket" : "#ticket#",
 
Upvote 0
Newbie Spellweaver
Joined
Aug 22, 2012
Messages
41
Reaction score
5
bump! And I can confirm it's not Butterfly changing the ticket as I gave it a MySQL user with UPDATE privileges revoked on user_tickets.
 
Last edited:
Upvote 0
Initiate Mage
Joined
Nov 23, 2013
Messages
2
Reaction score
0
Your saying user_ticket, but in the PHP file it stands auth_ticket, maybe that's the problem.
 
Upvote 0
Back
Top