BrainCMS register error

Status
Not open for further replies.

DanishAdam

Member
Jan 28, 2020
69
15
Hello devbest

Why'd I got this error? Please help. I use Brain CMS 1.8.1

You must be registered for see images attach
 
Solution
Hmm, this is tricky. It says it can't find the column in your database called "ip_reg" which shouldn't be a problem since I don't have it either.

I assume you've imported the database from BrainCMS and Arcturus Morningstar in the same database you're using?
Have you also change your Emulator to arcturus in your brain-config.php file? That file can be found in folder: system
The line should be:
PHP:
$config['hotelEmu'] = 'arcturus'; // plusemu // arcturus

If that doesn't work you could try to change another php file, but I doubt that will fix it...
That is, you open "class.user.php" which can be found in system/app/classes
There you go to line 146, and change ip_reg to ip_register. See the code below.

From:
PHP:
        public static...

DanishAdam

Member
Jan 28, 2020
69
15
Hello Benden,
did you mean this?
<style>
.error {
text-align: center;
font-size: 13px;
background: #f44336;
display: none;
width: 100%;
color: #fff;
padding: 0 10px;
border-radius: 2px;
margin-bottom: 8px;
line-height: 40px;
}
</style>
<?php

if(isset($_GET['userref'])) {
$userref = $_GET['userref'];
}
else{
$userref = null;
}

?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><?= $config['hotelName'] ?> | Make friend and get noticed!</title>
<link href=" " rel="stylesheet" type="text/css">
<link href="/templates/brain/style/css/register.css?v=<?= rand(1,100011111) ?>" rel="stylesheet" type="text/css">
<link href=" " rel="stylesheet" type="text/css">
<link href=" " rel="stylesheet" type="text/css">
<script src=' '></script>
<link href=" " rel="stylesheet">
<link href="/templates/brain/style/css/avatargenerate.css" rel="stylesheet" />
<meta name="description" content="Virtual world where you can make and meet friends.">
<meta name="keywords" content="<?= $config['hotelName'] ?>, <?= $config['hotelName'] ?>hotel, <?= $config['hotelName'] ?> hotel, virtueel, wereld, sociaal netwerk, gratis, community, avatar, chat, online, tiener, roleplaying, doe mee, sociaal, groepen, forums, veilig, speel, games, on, vrienden, tieners, zeldzaams, zeldzame meubi, verzamelen, maak, verzamel, kom in contact, meubi, meubeks, huisdieren, kamer inrichten, delen, uitdrukking, badges, hangout, muziek, beroemdheid, VIP-visits, celebs, mmo, mmorpgs, massive multiplayer">
<script src=" "></script>
<script src=" "></script>
<script src="./templates/brain/js/register.js?v=<?= rand(1,100011111) ?>"></script>
<script type="text/javascript">
var language = '<?php echo $config['lang']; ?>';
</script>
</head>
<body>
<nav style="height: 56px;" class="navbar navbar-default">
<div class="navbar-header"><a href="/"></a></div>
<div class="container"><div class="users-online" id="users-online"><span id="usersOnline"><?= Game::usersOnline() ?></span> <?= $config['hotelName'] ?>'s online.</div>
</nav>
<div class="container">
<div class="logotipo" style="color: #158cba;width: 82px; height: 34px; font-size: 37px; font-family: 'Pacifico', cursive; top: -2px; position: absolute;"><a style="color: #158cba; text-decoration: none;" href="/"> <?= $config['hotelName'] ?> </a></div>
<div style="clear:both;"></div>
<div class="panel panel-success" style="width: 56%;float: left;padding: 8px;">
<fieldset>
<legend><?php echo $lang['Rregister']; ?></legend>
<span class="error" id="top"></span>
<div class="form-group">
<label for="inputUsername" class="col-lg-4 control-label"><?php echo $lang['Rname']; ?></label>
<div class="col-lg-8">
<input type="text" class="form-control" name="username" id="username" onkeyup="checkUsernameOrEmail(this.value, 'username')" placeholder="<?php echo $lang['Rname']; ?>...">
<i class="glyphicon glyphicon-user form-control-feedback" style="right: 10px;"></i>
</div>
</div>
<div class="form-group">
<label for="inputUsername" class="col-lg-4 control-label"><?php echo $lang['Rmotto']; ?></label>
<div class="col-lg-8">
<input type="text" class="form-control" name="motto" id="motto" placeholder="<?php echo $lang['Rmotto']; ?>" value="<?= $config['startMotto'] ?>">
<i class="glyphicon glyphicon-star form-control-feedback" style="right: 10px;"></i>
</div>
</div>
<div class="form-group">
<label for="inputEmail" class="col-lg-4 control-label"><?php echo $lang['Remail']; ?></label>
<div class="col-lg-8">
<input type="text" class="form-control" name="email" id="email" onkeyup="checkUsernameOrEmail(this.value, 'email')" placeholder="<?php echo $lang['Remail']; ?>...">
<i class="glyphicon glyphicon-envelope form-control-feedback" style="right: 10px;"></i>
</div>
</div>
<div class="form-group">
<label for="inputPassword" class="col-lg-4 control-label"><?php echo $lang['Rpassword']; ?></label>
<div class="col-lg-8">
<input type="password" class="form-control" name="password" id="password" onkeyup="checkPasswords(this.value, 'password')" placeholder="<?php echo $lang['Rpassword']; ?>...">
<i class="glyphicon glyphicon-lock form-control-feedback" style="right: 10px;"></i>
</div>
</div>
<div class="form-group">
<label for="inputPassword2" class="col-lg-4 control-label"><?php echo $lang['Rrepeatpassword']; ?></label>
<div class="col-lg-8">
<input type="password" class="form-control" name="password_repeat" id="password_repeat" onkeyup="checkPasswords(this.value, 'password_repeat')" placeholder="<?php echo $lang['Rrepeatpassword']; ?>...">
<i class="glyphicon glyphicon-lock form-control-feedback" style="right: 10px;"></i>
</div>
</div>
<div class="form-group">
<label for="inputPassword2" class="col-lg-4 control-label">Referrer</label>
<div class="col-lg-8">
<input type="text" class="form-control" name="referrer" id="referrer" value="<?= $userref; ?>" onkeyup="checkUsernameOrEmail(this.value, 'referrer')" placeholder="">
If you were referred to this site by an existing member of <?= $config['hotelName'] ?>
<i class="glyphicon glyphicon-tag form-control-feedback" style="right: 10px;"></i>
</div>
</div>
<div class="form-group">
<div style="width: 0%;" class="col-lg-8">
<div id="avatarSelector" class="builder-viewport" style="margin-top: -45px;">
<div class="main-navigation">
<ul>
<li class="active">
<a href="#" data-navigate="hd" data-subnav="gender"><img src="/templates/brain/style/images/avatarreg/body.png" /></a>
</li>
<li>
<a href="#" data-navigate="hr" data-subnav="hair"><img src="/templates/brain/style/images/avatarreg/hair.png" /></a>
</li>
<li>
<a href="#" data-navigate="ch" data-subnav="tops"><img src="/templates/brain/style/images/avatarreg/tops.png" /></a>
</li>
<li>
<a href="#" data-navigate="lg" data-subnav="bottoms"><img src="/templates/brain/style/images/avatarreg/bottoms.png" /></a>
</li>
</ul>
</div>
<div class="sub-navigation">
<ul id="gender" class="display">
<li>
<a href="#" class="male nav-selected" data-gender="M"></a>
</li>
<li>
<a href="#" class="female" data-gender="F"></a>
</li>
</ul>
<ul id="hair" class="hidden">
<li>
<a href="#" class="hair nav-selected" data-navigate="hr"></a>
</li>
<li>
<a href="#" class="hats" data-navigate="ha"></a>
</li>
<li>
<a href="#" class="hair-accessories" data-navigate="he"></a>
</li>
<li>
<a href="#" class="glasses" data-navigate="ea"></a>
</li>
<li>
<a href="#" class="moustaches" data-navigate="fa"></a>
</li>
</ul>
<ul id="tops" class="hidden">
<li>
<a href="#" class="tops nav-selected" data-navigate="ch"></a>
</li>
<li>
<a href="#" class="chest" data-navigate="cp"></a>
</li>
<li>
<a href="#" class="jackets" data-navigate="cc"></a>
</li>
<li>
<a href="#" class="accessories" data-navigate="ca"></a>
</li>
</ul>
<ul id="bottoms" class="hidden">
<li>
<a href="#" class="bottoms nav-selected" data-navigate="lg"></a>
</li>
<li>
<a href="#" class="shoes" data-navigate="sh"></a>
</li>
<li>
<a href="#" class="belts" data-navigate="wa"></a>
</li>
</ul>
</div>
<div id="clothes-colors">
<div id="clothes"></div>
<div id="colors"></div>
</div>
<div id="avatar">
<img id="myHabbo" value="" src="" alt="My Habbo" title="My Habbo" />
<input type="hidden" name="habbo-avatar" id="avatar_code">
</div>
</div>
</div>
</div>
<?php
if($config['recaptchaSiteKeyEnable'] == true)
{
?>
<div class="form-group">
<label for="inputcaptcha" class="col-lg-4 control-label"><?php echo $lang['Rrobot']; ?></label>
<div class="col-lg-8">
<div class="g-recaptcha" data-sitekey="<?= $config['recaptchaSiteKey'] ?>"></div>
</div>
</div>
<?php
}
?><div style="clear:both;"></div>
<center>
<div class="form-group" style="text-align: right;">
<div class="col-lg-8 col-lg-offset-4">
<a href="/index" class="btn btn-default"><?php echo $lang['Rback']; ?></a>
<button type="submit" name="register" id="registerSubmit" class="btn btn-primary"><?php echo $lang['Rregister']; ?></button>
</div>
</div></center>
</fieldset></div>
<div style="float: right; width: 42%;" class="list-group">
<a class="list-group-item">
<div class="subimage1"></div>
<h4 class="list-group-item-heading"><?php echo $lang['Rtext1header']; ?></h4>
<p class="list-group-item-text"><?php echo $lang['Rtext1']; ?></p>
</a>
<a class="list-group-item">
<div class="subimage2"></div>
<h4 class="list-group-item-heading"><?php echo $lang['Rtext2header']; ?></h4>
<p class="list-group-item-text"><?php echo $lang['Rtext2']; ?></p>
</a>
<a class="list-group-item">
<div class="subimage3"></div>
<h4 class="list-group-item-heading"><?php echo $lang['Rtext3header']; ?></h4>
<p class="list-group-item-text"><?php echo $lang['Rtext3']; ?></p>
</a>
<a class="list-group-item">
<div class="subimage4"></div>
<h4 class="list-group-item-heading"><?php echo $lang['Rtext4header']; ?></h4>
<p class="list-group-item-text"><?php echo $lang['Rtext4']; ?></p>
</a>
</div>
<div style="clear:both;"></div><footer class="footer" style="font-size: 13.5px; font-weight: 100;">
<center>
<?php echo $lang['RCopyright']; ?>
</div>
</body>
</html>
<script src=" " type="text/javascript"></script>
<script src="/templates/brain/style/js/jquery.avatargenerate.js?v=17" type="text/javascript"></script>
Post automatically merged:

I think that I missing table at db, please help
 
Last edited:

Wieiscool

New Member
Jan 27, 2013
28
11
When you right click, and open up Inspect Element, what does it say in the Console tab?

If you use the English language in Brain CMS, and you get that error on the register page, it should say why in the Console.

Edit: What Emulator are you using? To my knowledge BrainCMS only works correctly with PlusEmu and Arcturus. I myself use Arcturus Morningstar and everything works fine.
 
Last edited:

DanishAdam

Member
Jan 28, 2020
69
15
When you right click, and open up Inspect Element, what does it say in the Console tab?

If you use the English language in Brain CMS, and you get that error on the register page, it should say why in the Console.

Edit: What Emulator are you using? To my knowledge BrainCMS only works correctly with PlusEmu and Arcturus. I myself use Arcturus Morningstar and everything works fine.

This is what you asking for. Btw thanks for responding! :D
I use Arcturus Morningstar

You must be registered for see images attach


What should I do?
 

Object

?
Nov 10, 2017
429
352
This is what you asking for. Btw thanks for responding! :D
I use Arcturus Morningstar

You must be registered for see images attach


What should I do?
It's looking for "ip_reg" in the users table which doesnt exists. Modify the register method where ever it's on Brain to match your Arcturus morningstar columns
 

Wieiscool

New Member
Jan 27, 2013
28
11
Hmm, this is tricky. It says it can't find the column in your database called "ip_reg" which shouldn't be a problem since I don't have it either.

I assume you've imported the database from BrainCMS and Arcturus Morningstar in the same database you're using?
Have you also change your Emulator to arcturus in your brain-config.php file? That file can be found in folder: system
The line should be:
PHP:
$config['hotelEmu'] = 'arcturus'; // plusemu // arcturus

If that doesn't work you could try to change another php file, but I doubt that will fix it...
That is, you open "class.user.php" which can be found in system/app/classes
There you go to line 146, and change ip_reg to ip_register. See the code below.

From:
PHP:
        public static function refUser($refUsername)
        {
            global $dbh, $lang;
            $getUsernameRef = $dbh->prepare("SELECT username,ip_reg FROM users WHERE username = :username LIMIT 1");
            $getUsernameRef->bindParam(':username', $refUsername);
            $getUsernameRef->execute();
            $getUsernameRefData = $getUsernameRef->fetch();
            if ($getUsernameRef->RowCount() > 0)
            {
                if ($getUsernameRefData['ip_reg'] == userIp())
                {
                    //html::error($lang["RsameIpRef"]);
                    echo 'ref_error';
                }
                else
                {
                    return true;
                }
            }
            else
            {   
                //html::error($lang["RnotExist"]);
                echo 'ref_error';
                return false;
            }
        }

To:

PHP:
        public static function refUser($refUsername)
        {
            global $dbh, $lang;
            $getUsernameRef = $dbh->prepare("SELECT username,ip_register FROM users WHERE username = :username LIMIT 1");
            $getUsernameRef->bindParam(':username', $refUsername);
            $getUsernameRef->execute();
            $getUsernameRefData = $getUsernameRef->fetch();
            if ($getUsernameRef->RowCount() > 0)
            {
                if ($getUsernameRefData['ip_register'] == userIp())
                {
                    //html::error($lang["RsameIpRef"]);
                    echo 'ref_error';
                }
                else
                {
                    return true;
                }
            }
            else
            {   
                //html::error($lang["RnotExist"]);
                echo 'ref_error';
                return false;
            }
        }

I hope the first solution works, if it doesn't, I hope the second one works.
If still nothing works, let me know and we and hopefully other people on this forum can help you out!
 
Solution

DanishAdam

Member
Jan 28, 2020
69
15
It's looking for "ip_reg" in the users table which doesnt exists. Modify the register method where ever it's on Brain to match your Arcturus morningstar columns
yes absolutely true! in db its named "ip_register". Now it fixed. Thank you!
Post automatically merged:

Hmm, this is tricky. It says it can't find the column in your database called "ip_reg" which shouldn't be a problem since I don't have it either.

I assume you've imported the database from BrainCMS and Arcturus Morningstar in the same database you're using?
Have you also change your Emulator to arcturus in your brain-config.php file? That file can be found in folder: system
The line should be:
PHP:
$config['hotelEmu'] = 'arcturus'; // plusemu // arcturus

If that doesn't work you could try to change another php file, but I doubt that will fix it...
That is, you open "class.user.php" which can be found in system/app/classes
There you go to line 146, and change ip_reg to ip_register. See the code below.

From:
PHP:
        public static function refUser($refUsername)
        {
            global $dbh, $lang;
            $getUsernameRef = $dbh->prepare("SELECT username,ip_reg FROM users WHERE username = :username LIMIT 1");
            $getUsernameRef->bindParam(':username', $refUsername);
            $getUsernameRef->execute();
            $getUsernameRefData = $getUsernameRef->fetch();
            if ($getUsernameRef->RowCount() > 0)
            {
                if ($getUsernameRefData['ip_reg'] == userIp())
                {
                    //html::error($lang["RsameIpRef"]);
                    echo 'ref_error';
                }
                else
                {
                    return true;
                }
            }
            else
            {  
                //html::error($lang["RnotExist"]);
                echo 'ref_error';
                return false;
            }
        }

To:

PHP:
        public static function refUser($refUsername)
        {
            global $dbh, $lang;
            $getUsernameRef = $dbh->prepare("SELECT username,ip_register FROM users WHERE username = :username LIMIT 1");
            $getUsernameRef->bindParam(':username', $refUsername);
            $getUsernameRef->execute();
            $getUsernameRefData = $getUsernameRef->fetch();
            if ($getUsernameRef->RowCount() > 0)
            {
                if ($getUsernameRefData['ip_register'] == userIp())
                {
                    //html::error($lang["RsameIpRef"]);
                    echo 'ref_error';
                }
                else
                {
                    return true;
                }
            }
            else
            {  
                //html::error($lang["RnotExist"]);
                echo 'ref_error';
                return false;
            }
        }

I hope the first solution works, if it doesn't, I hope the second one works.
If still nothing works, let me know and we and hopefully other people on this forum can help you out!
Thank you, the second method is works! Thank you for helping me solve this error!
 
Status
Not open for further replies.

Users who are viewing this thread

Top