HELP REG SITE HELP [IMPORTANT! i got VPS]

02/25/2010 08:38 allizzel777#1
can someone help me :( i am trying to get my server working on my VPS and i have a site and all up and running one thing on it isnt set up right
Login Server: Online
Game Server: Online
Registration: Online
Players Online: 2
thats all wrong no matter what... because thats set up for my friends server...
i would like help setting up a reg site on my VPS because appserv will not work on it :( wont let me install it and i really just need a reg site and i will be 95% done with my site...,
well and a custom client but idc about that atm...,
Can someone help me set it up?
if you would like to see what we have so[Only registered and activated users can see links. Click Here To Register...]
can some one help me fix this? and the Login server online game server online... ect, fix that too?
please! 5165 btw
02/25/2010 20:34 .Ocularis#2
Does your server use pfsql, mssql, or mysql
02/26/2010 05:04 allizzel777#3
Quote:
Originally Posted by Mentalis View Post
Does your server use pfsql, mssql, or mysql
MySQL
02/26/2010 09:25 Korvacs#4
5165 DOES NOT use MySQL, it uses a flatfile ini database for everything, the MySQL username and password reference has nothing to do with the server, it was left in there from a time when they were thinking about using it.

Also, please search the release forum, there have been atleast 5 Register pages for the 5165 server.
02/26/2010 09:49 .Ocularis#5
Quote:
Originally Posted by Korvacs View Post
5165 DOES NOT use MySQL, it uses a flatfile ini database for everything, the MySQL username and password reference has nothing to do with the server, it was left in there from a time when they were thinking about using it.

Also, please search the release forum, there have been atleast 5 Register pages for the 5165 server.
My 5165 server does... His may also.



Start with the file that gives your server status...

make a new file called 'status.php' and place it where ever. Just make sure you update links.

PHP Code:
<div id="ServerStatus" style="width:200px; float:left"> <b>Server Status</b> <a href="#" onClick="SmartyAjax.update('ServerStatus', '/inc/status.php', 'get', 'f=getStatus'); return false;">(Refresh)</a><br />
  <br />
  <table width="150" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td width="200"><a href="http://www.yourserver.com/Server.zip">YourCo</a></td>
      <td width="100"><span id="fffff"><?php
include ('config.php');

            
            echo 
'';
            
$fp = @fsockopen($serveraddress$serverport$errno$errstr1);
            if (!
$fp) {
                echo 
'<font style="color: #FF3300"><b>Offline</b></font><br />';
            }
            else
            {
                echo 
'<font style="color: #00FF00"><b>Online</b></font><br />';
                
fclose($fp);
            }

?></span></td>
    </tr>
  </table>
  <table width="151" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td width="80"><a href="ventrilo://64.120.135.109:3784/servername=TrinityVentrilo">Ventrilo?</a></td>
      <td width="51"><span id="fffff2"><?php

            
            
echo '';
            
$fp = @fsockopen($serveraddress2$serverport2$errno$errstr1);
            if (!
$fp) {
                echo 
'<font style="color: #FF3300"><b>Offline</b></font><br />';
            }
            else
            {
                echo 
'<font style="color: #00FF00"><b>Online</b></font><br />';
                
fclose($fp);
            }

?></span></td>
    </tr>
  </table>
  <table width="150" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td width="83">      <?php
      
include ('config.php');
$link=mysql_connect ($myhost$myuser$mypass) or die ('Error: ' mysql_error());
mysql_select_db ($mydb);
$res mysql_query("SELECT count(*) FROM accounts;");
$val mysql_fetch_array($res);
echo 
"<div style='top: 460; left: 550; position: absolute; z-index: 1; visibility: show;'>Accounts Created: ".$val[0]."</div>";
?></td>

      <br />
    </tr>
  </table>
  <table width="150" border="0" cellspacing="0" cellpadding="5">
    <tr>
      <td width="140"><?php
      
include ('config.php');
$link=mysql_connect ($myhost$myuser$mypass) or die ('Error: ' mysql_error());
mysql_select_db ($mydb);
$res mysql_query("SELECT count(*) FROM entities;");
$val mysql_fetch_array($res);
echo 
"<div style='top: 480; left: 550; position: absolute; z-index: 1; visibility: show;'>Characters Created: ".$val[0]."</div>";
?></td>

      <br />

      
    </tr>
  </table>
  <br />
  <div id="ServerStatus2" style="width:200px; float:right"> 
    <p><b>A place to put more stuff if needed..</b><br />
      <br />
      <br />
      Stuff here...<a style="color:#F00;" href="http://www.yourserver.com/Server.zip" target="_blank">link here...</a><br />more stuff here...</p>
  </div>
</div>
Then add a 'config.php', make sure its in the same folder as 'status.php'
PHP Code:
<?php
    $myhost
='sql ip';
    
$mypass='sql pass';
    
$myuser='sql user... usually 'root'';
    
$mydb='sql database';
    
$gamedb='character table..';
    
$accdb='accounts table...';
     
$serveraddress='server 1 ip here';
    
$serverport='server 1 port here';
     
$serveraddress2='server 2 ip...';
    
$serverport2='server 2 port here';
  
?>
Then add this somewhere between your [head] and [/head]
PHP Code:
<script src="source/js/prototype.js" type="text/javascript"></script>
<script src="source/js/smarty_ajax.js" type="text/javascript"></script> 
Download 'prototype.js' and 'smarty_ajax.js' from the bottom of this post
And put them in a new folder located at webroot/source/js/

Find the line that says [body] and replace it with this
PHP Code:
<body onload="SmartyAjax.update('ServerStatus', 'inc/status.php', 'get', 'f=getStatus'); return false;"
<div id="ajax_loader">Loading Data</div
Notice it says inc/status.php... If you have status.php in the root of your web folder make that 'status.php' instead of 'inc/status.php'

Then add this anywhere you like. You can add a float... You could map it with cords...... Place this anywhere you like.

PHP Code:
    <div id="ServerStatus" style="width:200px; float:left"> <b>Server Status</b> <br />
    </
div
That div will get refreshed by the 'smart_ajax' script adding the info from the status.php which reads from the config file to get your server ip and port to use to connect to your server and retrive server status and sql info.

You can add your php scripts that read how many players are logged in from your site and add it to this.
I'm not sure if this will fix your program but it's worth a shot! ;)
02/26/2010 10:00 Korvacs#6
Did you convert it yourself? Ive never seen a released version of 5165 with MySQL, theres been a load of threads asking for it, but never a release o.O
02/26/2010 10:01 .Ocularis#7
Wanna see? add me on msn [Only registered and activated users can see links. Click Here To Register...]

I'm waiting... and it's lateish... So hurry D:
02/26/2010 10:18 LegalConquer#8
u needed that whole javascript to do that?
i have a very short php code that does all that without javascript at all from my old website when i used to use 5165.
02/26/2010 10:27 .Ocularis#9
It's just and extra thing... You don't really need that whole javascript, but when I do a website... :P everything moves or at least does something cool...
I like to build websites people go to just for fun and to click buttons...

I think I'll add a 'big red button' on my website somewhere just in case of server downtime
02/26/2010 10:30 LegalConquer#10
XD weird fetish but ok :P