Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Little PHP error help?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="DrPepper" data-source="post: 151732" data-attributes="member: 19446"><p><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">Warning</span></span></span></strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">: mysql_pconnect(): Host 'c-24-131-62-42.hsd1.ga.comcast.net' is not allowed to connect to this MySQL server in </span></span></span><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">C:\Documents and Settings\HP_Owner\Desktop\New Folder\xampp\htdocs\app\class.engine.php</span></span></span></strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000"> on line </span></span></span><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">48</span></span></span></strong></p><p><strong><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">MySQL Engine - RevCMS: </span></span></span></strong></p><p><span style="font-size: 15px"><span style="font-family: 'Times New Roman'"><span style="color: #000000">MySQL could not connect to host</span></span></span></p><p> </p><p>[CODE]<?php</p><p> </p><p>namespace Revolution;</p><p>if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }</p><p>class engine</p><p>{</p><p> private $initiated;</p><p> private $connected;</p><p> </p><p> private $connection;</p><p> </p><p> </p><p> final public function Initiate()</p><p> {</p><p> global $_CONFIG;</p><p> if(!$this->initiated)</p><p> {</p><p> $this->setMySQL('connect', mysql_connect);</p><p> $this->setMySQL('pconnect', mysql_pconnect);</p><p> $this->setMysql('select_db', mysql_select_db);</p><p> $this->setMySQL('query', mysql_query);</p><p> $this->setMySQL('num_rows', mysql_num_rows);</p><p> $this->setMySQL('fetch_assoc', mysql_fetch_assoc);</p><p> $this->setMySQL('fetch_array',mysql_fetch_array);</p><p> $this->setMySQL('result', mysql_result);</p><p> $this->setMySQL('free_result', mysql_free_result);</p><p> $this->setMySQL('escape_string', mysql_real_escape_string);</p><p> </p><p> $this->initiated = true;</p><p> </p><p> $this->connect($_CONFIG['mysql']['connection_type']);</p><p> }</p><p> }</p><p> </p><p> final public function setMySQL($key, $value)</p><p> {</p><p> $this->mysql[$key] = $value;</p><p> }</p><p> </p><p> </p><p> /*-------------------------------Manage Connection-------------------------------------*/</p><p> </p><p> final public function connect($type)</p><p> {</p><p> global $core, $_CONFIG;</p><p> if(!$this->connected)</p><p> {</p><p> $this->connection = $this->mysql[$type]($_CONFIG['mysql']['hostname'], $_CONFIG['mysql']['username'], $_CONFIG['mysql']['password']);</p><p> </p><p> if($this->connection)</p><p> {</p><p> $mydatabase = $this->mysql['select_db']($_CONFIG['mysql']['database'], $this->connection);</p><p> </p><p> if($mydatabase)</p><p> {</p><p> $this->connected = true; </p><p> }</p><p> else</p><p> {</p><p> $core->systemError('MySQL Engine', 'MySQL could not connect to database');</p><p> }</p><p> }</p><p> else</p><p> {</p><p> $core->systemError('MySQL Engine', 'MySQL could not connect to host'); </p><p> }</p><p> }</p><p> }</p><p> </p><p> final public function disconnect()</p><p> {</p><p> global $core;</p><p> if($this->connected)</p><p> {</p><p> if($this->mysql['close'])</p><p> {</p><p> $this->connected = false;</p><p> }</p><p> else</p><p> {</p><p> $core->systemError('MySQL Engine', 'MySQL could not disconnect.');</p><p> }</p><p> }</p><p> }</p><p> </p><p> /*-------------------------------Secure MySQL variables-------------------------------------*/</p><p> </p><p> final public function secure($var)</p><p> {</p><p> return $this->mysql['escape_string'](stripslashes(htmlspecialchars($var)));</p><p> }</p><p> </p><p> /*-------------------------------Manage MySQL queries-------------------------------------*/</p><p> </p><p> final public function query($sql)</p><p> {</p><p> return $this->mysql['query']($sql, $this->connection) or die(mysql_error());</p><p> }</p><p> </p><p> final public function num_rows($sql)</p><p> {</p><p> return $this->mysql['num_rows']($this->mysql['query']($sql, $this->connection));</p><p> }</p><p> </p><p> final public function result($sql)</p><p> {</p><p> return $this->mysql['result']($this->mysql['query']($sql, $this->connection), 0);</p><p> }</p><p> </p><p> final public function free_result($sql)</p><p> {</p><p> return $this->mysql['free_result']($sql);</p><p> }</p><p> </p><p> final public function fetch_array($sql)</p><p> {</p><p> $query = $this->mysql['query']($sql, $this->connection);</p><p> </p><p> $data = array();</p><p> </p><p> while($row = $this->mysql['fetch_array']($query))</p><p> {</p><p> $data[] = $row;</p><p> }</p><p> </p><p> return $data;</p><p> }</p><p> </p><p> final public function fetch_assoc($sql)</p><p> {</p><p> return $this->mysql['fetch_assoc']($this->mysql['query']($sql, $this->connection));</p><p> }</p><p> </p><p> </p><p> </p><p> </p><p>}</p><p>?>[/CODE]</p></blockquote><p></p>
[QUOTE="DrPepper, post: 151732, member: 19446"] [B][SIZE=4][FONT=Times New Roman][COLOR=#000000]Warning[/COLOR][/FONT][/SIZE][/B][SIZE=4][FONT=Times New Roman][COLOR=#000000]: mysql_pconnect(): Host 'c-24-131-62-42.hsd1.ga.comcast.net' is not allowed to connect to this MySQL server in [/COLOR][/FONT][/SIZE][B][SIZE=4][FONT=Times New Roman][COLOR=#000000]C:\Documents and Settings\HP_Owner\Desktop\New Folder\xampp\htdocs\app\class.engine.php[/COLOR][/FONT][/SIZE][/B][SIZE=4][FONT=Times New Roman][COLOR=#000000] on line [/COLOR][/FONT][/SIZE][B][SIZE=4][FONT=Times New Roman][COLOR=#000000]48[/COLOR][/FONT][/SIZE][/B] [B][SIZE=4][FONT=Times New Roman][COLOR=#000000]MySQL Engine - RevCMS: [/COLOR][/FONT][/SIZE][/B] [SIZE=4][FONT=Times New Roman][COLOR=#000000]MySQL could not connect to host[/COLOR][/FONT][/SIZE] [CODE]<?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)); } } ?>[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Little PHP error help?
Top