[TUT] Set up a R63 Hotel using Phoenix

Do you want more tutorials on how to set stuff up?

  • Yes

    Votes: 108 93.1%
  • No

    Votes: 8 6.9%

  • Total voters
    116

Gajeel

Well-Known Member
Oct 4, 2011
2,411
413
Warning: mysql_pconnect() [ ]: Host 'www' is not allowed to connect to this MySQL server in C:\xampp\htdocs\app\class.engine.php on line 48
MySQL Engine - RevCMS:
MySQL could not connect to host
After we corrected the swfs, externals etc..., that error appeared.

Here's our class.engine
PHP:
<?php
 
namespace Revolution;
if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }
class engine
{
    private $initiated;
    private $connected;
 
    private $connection;
 
 
    final public function Initiate()
    {
        global $_CONFIG;
        if(!$this->initiated)
        {
            $this->setMySQL('connect', mysql_connect);
            $this->setMySQL('pconnect', mysql_pconnect);
            $this->setMysql('select_db', mysql_select_db);
            $this->setMySQL('query', mysql_query);
            $this->setMySQL('num_rows', mysql_num_rows);
            $this->setMySQL('fetch_assoc', mysql_fetch_assoc);
            $this->setMySQL('fetch_array',mysql_fetch_array);
            $this->setMySQL('result', mysql_result);
            $this->setMySQL('free_result', mysql_free_result);
            $this->setMySQL('escape_string', mysql_real_escape_string);
         
            $this->initiated = true;
     
            $this->connect($_CONFIG['mysql']['connection_type']);
        }
    }
 
    final public function setMySQL($key, $value)
    {
        $this->mysql[$key] = $value;
    }
 
 
    /*-------------------------------Manage Connection-------------------------------------*/
 
    final public function connect($type)
    {
        global $core, $_CONFIG;
        if(!$this->connected)
        {
            $this->connection = $this->mysql[$type]($_CONFIG['mysql']['hostname'], $_CONFIG['mysql']['username'], $_CONFIG['mysql']['password']);
         
            if($this->connection)
            {
                $mydatabase = $this->mysql['select_db']($_CONFIG['mysql']['database'], $this->connection);
             
                if($mydatabase)
                {
                    $this->connected = true; 
                }
                else
                {
                    $core->systemError('MySQL Engine', 'MySQL could not connect to database');
                }
            }
            else
            {
                $core->systemError('MySQL Engine', 'MySQL could not connect to host');         
            }
        }
    }
 
    final public function disconnect()
    {
        global $core;
        if($this->connected)
        {
            if($this->mysql['close'])
            {
                $this->connected = false;
            }
            else
            {
                $core->systemError('MySQL Engine', 'MySQL could not disconnect.');
            }
        }
    }
 
    /*-------------------------------Secure MySQL variables-------------------------------------*/
 
    final public function secure($var)
    {
        return $this->mysql['escape_string'](stripslashes(htmlspecialchars($var)));
    }
 
    /*-------------------------------Manage MySQL queries-------------------------------------*/
 
    final public function query($sql)
    {
        return $this->mysql['query']($sql, $this->connection) or die(mysql_error());
    }
 
    final public function num_rows($sql)
    {
        return $this->mysql['num_rows']($this->mysql['query']($sql, $this->connection));
    }
 
    final public function result($sql)
    {
        return $this->mysql['result']($this->mysql['query']($sql, $this->connection), 0);
    }
 
    final public function free_result($sql)
    {
        return $this->mysql['free_result']($sql);
    }
 
    final public function fetch_array($sql)
    {
        $query = $this->mysql['query']($sql, $this->connection);
     
        $data = array();
     
        while($row = $this->mysql['fetch_array']($query))
        {
            $data[] = $row;
        }
     
        return $data;
    }
 
    final public function fetch_assoc($sql)
    {
        return $this->mysql['fetch_assoc']($this->mysql['query']($sql, $this->connection));
    }
 
 
 
 
}
?>

We're using a legitimate Phoenix license.
EDIT-
When we reverted them back to localhost, it worked.. so what's the problem? the SWFs themselves?
 

Djulli

New Member
Jan 1, 2012
1
1
Object not found!

The requested URL was not found on this server. The link on the seems to be wrong or outdated. Please inform the author of about the error.
If you think this is a server error, please contact the webmaster.
Error 404


08/03/10 19:14:04
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1

i open my client an it say Object not found!......
 

ojee66

New Member
Jan 14, 2012
3
0
The logout button is pointing to a non existing page.
Searched for solution and in the php files but could not find something.
 

brsy

nah mang
May 12, 2011
1,530
272
The logout button is pointing to a non existing page.
Searched for solution and in the php files but could not find something.
ONT: Get a real domain. Your hotel is easier to hack when you use an IP.
OFT: What kinda hotel name is that?
 

ojee66

New Member
Jan 14, 2012
3
0
ONT: Get a real domain. Your hotel is easier to hack when you use an IP.
Ping domain and there you have the IP.....
It's kind of chat for my radiostream and my son was bagging for a own habbo :(
 

KyleVonnie

Come @ me Bro!
Oct 26, 2011
993
176
I used this tut and my retro worked for a bit, but when i tried a second time, the phoenix emu says this -

" >> Connection Disposed [0] from [127.0.0.1] "

And then the client dc. plz help!
 

Solar

Member
Jan 24, 2012
135
10
Code:
dynamic.download.url=http://%predefined%/gordon/hof_furni/
dynamic.download.name.template=%typeid%.cct
dynamic.download.samples.template=%typeid%.cct

Very nice tutorial! After being away from the hotel for a long time, I needed to be updated. I, for some reason cannot view furniture.

I haven't changed any folders or edit the vars. I use to be able to figure out how to fix the furniture a long time ago... but it has been awhile. haha.

Thanks in advanced.

FIXED: I used the updated external_vars. I also retrieved some new dcrs.
 

KyleVonnie

Come @ me Bro!
Oct 26, 2011
993
176
Does anyone know how to fix this error:

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/a7641883/public_html/global.php on line 22
 

Solar

Member
Jan 24, 2012
135
10
Does anyone know how to fix this error:

Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/a7641883/public_html/global.php on line 22

Code:
use Revolution as Rev;
That is what I have on my line 22 and it seems to be working. Did you accidently edit that file?
 

Thom

You can't touch this
Oct 1, 2010
1,305
386
Hi users, If you are having trouble, please include information about your issues such as an image or the error, rather than just requesting help!

Thanks!

Glad to see so many people are using this tutorial though! :D
 

Ryabs

Christmas Donator
Dec 30, 2011
343
39
Hey Im need of of help with this ;
site;
CONFIG ;
 

Lunabelx

New Member
Feb 9, 2012
1
0
This is a thread to set up Phoenix and RevCMS successfully. If you have done that, great!
If you need other help, please make a thread in the help section :)
im actually trying to make an ubercms r63 habbo retro but it's kinda hard and the other tut doesnt shows everything you need
 

james2012

Member
Feb 10, 2012
29
0
C:\xampp\htdocs\app\management and open config.php
Do i have to edit this config.php file or replace....so confusing..help me
 

Users who are viewing this thread

Top