Jump to content

PunKeD_GuRu

Members
  • Posts

    63
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

PunKeD_GuRu's Achievements

Advanced Member

Advanced Member (3/3)

0

Reputation

  1. Thanks for the reply. Will give it ago soon, and leave my feedback =).
  2. I suppose i should try n restart the pc... it has been acouple of months... Thanks for the reply thou, there wasnt any open realm windows, but it might have failed to close or something...
  3. When i try to lauch the mangos-realmd It says: MaNGOS realmd can not bind to 192.168.0.2:3724 terminate called after throwing an instance of 'std::runtime_error' what(): Dead Reference Aborted Put original realmd.conf in, and changed DB stuff. MaNGOS realmd can not bind to 0.0.0.0:3724 terminate called after throwing an instance of 'std::runtime_error' what(): Dead Reference Aborted Seems to have happened today. Every week or so I do an update, been updaing fine for a couple of months... Running Ubuntu 8.04. Downloaded mangos today (30th june(rev 10124)) Any help would be greatly appreciated.
  4. On the Wiki section, the Ubuntu install. 2nd requirement. 2.Your using 32-bit Ubuntu Server 8.04 / 8.10 or Debian 5.0 Does this mean that the install guide that follows it would not work on a 64Bit Ubuntu? I've run the server on win vista x64 without problems. Would like to take advantage of the servers CPU and use the 64Bit... Takes advantage of an extra 2GB memory stick i have somewhere aswel... Has anyone else setup a server on Ubuntu x64? Thanks for any feedback.
  5. Wish i could help, also havnt got it to work. Shame really. =(
  6. <?php /** * External Database auth plugin for phpBB3 * Based on phpbb's ldap auth plugin. * Pedro Dias - [email][email protected][/email] * [url]http://pedrodiasgeekyblog.blogspot.com/2008/11/external-database-authentication-for.html[/url] */ /* Credit goes to Pedro for posting the example on his blog. I made some changes to the script, since I was getting a connections error. The changes I made will help people who install phpbb3 into its own separate database. I can assist with some help pm acctman on phpbb3 p.s. I am not Pedro, I'm just giving him credit for his work. I modified the script to make it work better. */ /** * @ignore */ if (!defined('IN_PHPBB')) { exit; } function login_extdb(&$username, &$password) { global $db, $config, $user; if (!$password) { return array( 'status' => LOGIN_ERROR_PASSWORD, 'error_msg' => 'NO_PASSWORD_SUPPLIED', 'user_row' => array('user_id' => ANONYMOUS), ); } if (!$username) { return array( 'status' => LOGIN_ERROR_USERNAME, 'error_msg' => 'LOGIN_ERROR_USERNAME', 'user_row' => array('user_id' => ANONYMOUS), ); } //// START HERE //// change where you see FILL IN /// This is the connection for my existing member database $dbhost1 = 'localhost'; $dbuser1 = 'FILL IN'; //this is the mysql login for your existing member db $dbpass1 = 'FILL IN'; $dbname1 = 'FILL IN'; $conn = mysql_connect($dbhost1, $dbuser1, $dbpass1) or die ('Error connecting to mysql'); mysql_select_db($dbname1); // We need to select the required fields, check you member table and write down the // following USERNAME, PASSWORD, EMAIL field names. Example my existing member fields are called // m_user, m_pass and m_email yours will be different. If you're lazy you can also do a SELECT * // I would replace with SELECT m_user, m_pass, m_email // This is how my query looks: // $query = "SELECT m_user,m_pass,m_email FROM rate_members WHERE m_user = '".$username."'"; $query = "SELECT * FROM FILL_IN_MEMBER-TABLE WHERE FILL_IN_USERNAME_FIELD = '".$username."'"; $result = mysql_query($query); $num_rows = mysql_num_rows($result); if($num_rows == 1){ $row = mysql_fetch_array($result, MYSQL_ASSOC); $extuser = $row['FILL IN']; //user field from existing db member table $extpass = $row['FILL IN']; //pass field from existing db member table $extmail = $row['FILL IN']; //email field from existing db member table } if ($num_rows == 1) { if (strcmp($extuser,$username) == 0 && strcmp($extpass,md5($password)) == 0) { /// This is the connection for phpBB3's database. The next 6 lines can be removed only if you've installed phpBB3 into you existing site db. /// I decided to keep things separate to make it easier to backup/restore. $dbhost = 'localhost'; $dbuser = 'FILL IN'; // you can get the info from the config.php file in your forum root $dbpass = 'FILL IN'; $dbname = 'FILL IN'; //// END HERE //// you do not have to change anything else for the script to work $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); mysql_select_db($dbname); $sql ='SELECT user_id, username, user_password, user_passchg, user_email, user_type FROM phpbb_users' . " WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if ($row) { if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) { return array( 'status' => LOGIN_ERROR_ACTIVE, 'error_msg' => 'ACTIVE_ERROR', 'user_row' => $row, ); } return array( 'status' => LOGIN_SUCCESS, 'error_msg' => false, 'user_row' => $row, ); } else { $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = '" . $db->sql_escape('REGISTERED') . "' AND group_type = " . GROUP_SPECIAL; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if (!$row) { trigger_error('NO_GROUP'); } $extdb_user_row = array( 'username' => $username, 'user_password' => phpbb_hash($password), 'user_email' => $extmail, 'group_id' => (int) $row['group_id'], 'user_type' => USER_NORMAL, 'user_ip' => $user->ip, ); return array( 'status' => LOGIN_SUCCESS_CREATE_PROFILE, 'error_msg' => false, 'user_row' => $extdb_user_row, ); } } else { return array( 'status' => LOGIN_ERROR_PASSWORD, 'error_msg' => 'LOGIN_ERROR_PASSWORD', 'user_row' => array('user_id' => ANONYMOUS), ); } } return array( 'status' => LOGIN_ERROR_USERNAME, 'error_msg' => 'LOGIN_ERROR_USERNAME', 'user_row' => array('user_id' => ANONYMOUS), ); } ?> and for the SHA1 passwords: <?php /** * External MySQL auth plug-in for phpBB3 * * Authentication plug-ins is largely down to Sergey Kanareykin, our thanks to him. * * @package login * @version $Id: auth_dbext.php 8602 2009-04-09 16:38:27Z nzeyimana $ * @copyright NONE: use as you see fit but no guarantees * @license NONE: use as you see fit but no guarantees * */ /** * @ignore */ if (!defined('IN_PHPBB')) { exit; } /** * * @return boolean|string false if the user is identified and else an error message */ function init_dbext() { // TODO: do any needed initialization } /** * Login function */ function login_dbext(&$username, &$password) { global $db; // do not allow empty password if (!$password) { return array( 'status' => LOGIN_ERROR_PASSWORD, 'error_msg' => 'NO_PASSWORD_SUPPLIED', 'user_row' => array('user_id' => ANONYMOUS), ); } if (!$username) { return array( 'status' => LOGIN_ERROR_USERNAME, 'error_msg' => 'LOGIN_ERROR_USERNAME', 'user_row' => array('user_id' => ANONYMOUS), ); } ///////////////////////////////////////////////////////////////////////////////////////////////////////////// // Note: on my systems, I include these following lines from an external file that is not web-accessible ///////////////////////////////////////////////////////////////////////////////////////////////////////////// $db_host = "localhost"; // Here goes the MySQL server address, hostname or IP $db_user = "username"; // Here goes the MySQL user allowed to read the table below (GRANT SELECT ON ....) $db_password = "passwd"; // Here should go the password associated with the above user $db_database = "dbName"; // Here goes the Database containing the table below $db_table = "tblUsers"; // Here will goes the table list users allowed to login into PHPBB //////////////////////////////////////////////////////////////////////////////////////////////////////////// $col_username = "username"; $col_password = "password"; $hashMethod = "sha1"; // Can be one of: md5, sha1, plain // In case you choose to use a non-standard hashing function, be // sure to change below where the $hashedPassword variable is created $objMySqli = new mysqli($db_host, $db_user, $db_password, $db_database); /* check connection */ if (mysqli_connect_errno()) { return array( 'status' => LOGIN_ERROR_EXTERNAL_AUTH , 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH ', 'user_row' => array('user_id' => ANONYMOUS), ); } // Check the User/Password if($hashMethod == 'sha1') { $hashedPassword = sha1($password); } elseif($hashMethod == 'md5') { $hashedPassword = md5($password); } else { $hashedPassword = $password; } $sql = "SELECT 11 as ID FROM " . $db_table . " WHERE " . $col_username . " = '" . mysqli_real_escape_string($username) . "' AND " . $col_password . " = '" . mysqli_real_escape_string($hashedPassword) . "' "; if ( $result = $objMySqli->query($sql) ) { if ( $result->num_rows <= 0 ) { return array( 'status' => LOGIN_ERROR_USERNAME, 'error_msg' => 'LOGIN_ERROR_USERNAME', 'user_row' => array('user_id' => ANONYMOUS), ); } $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type FROM ' . USERS_TABLE . " WHERE username = '" . $db->sql_escape($username) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if ($row) { // User inactive... if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) { return array( 'status' => LOGIN_ERROR_ACTIVE, 'error_msg' => 'ACTIVE_ERROR', 'user_row' => $row, ); } // Successful login... return array( 'status' => LOGIN_SUCCESS, 'error_msg' => false, 'user_row' => $row, ); } // this is the user's first login so create an empty profile return array( 'status' => LOGIN_SUCCESS_CREATE_PROFILE, 'error_msg' => false, 'user_row' => user_row_dbext($username, sha1($password)), ); } else { // TODO: Handle this situation } // Not logged in using the external DB return array( 'status' => LOGIN_ERROR_EXTERNAL_AUTH, 'error_msg' => 'LOGIN_ERROR_EXTERNAL_AUTH', 'user_row' => array('user_id' => ANONYMOUS), ); } /** * This function generates an array which can be passed to the user_add function in order to create a user */ function user_row_dbext($username, $password) { global $db, $config, $user; // first retrieve default group id $sql = 'SELECT group_id FROM ' . GROUPS_TABLE . " WHERE group_name = '" . $db->sql_escape('REGISTERED') . "' AND group_type = " . GROUP_SPECIAL; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); if (!$row) { trigger_error('NO_GROUP'); } // generate user account data return array( 'username' => $username, 'user_password' => phpbb_hash($password), // Note: on my side, I don't use this because I want all passwords to remain on the remote system 'user_email' => '', // You can retrieve this Email at the time the user is authenticated from the external table 'group_id' => (int) $row['group_id'], 'user_type' => USER_NORMAL, 'user_ip' => $user->ip, ); } ?>
  7. Id love to know how to do this aswel! I have a phpbb3 forum setup on the same server along with file sharing just so all the uni folks have access to my movies/music/a forum to request/and a forum for bugs on the wow server currently i create each account manually as the mmfm seems to have stopped updating and im not good enough at this kinda stuff to do it myself =( if someone was to share how they have theirs i could prob smooth of some corners on it! =)
  8. U host multiple realm databases? seems like a waste unless u have seperate logins for each realm.
  9. this is behind a a router, pretty much one sided. having the database port forwarded can be a high security risk. however if ur using the standard MySQL setup simply forward port 3306. (this is fo MySQL)
  10. generally if the patch is worth it... its likely that mangos will pick it up and accept it... that or the patch still needs some work
  11. linage, guildwars... a few other games use the same sorta systems of a C++ app + MySQL's etc But mangos is very specific to the current wow client... yourd be better of creating from stratch, rather than trying to modify the mangos core into a diff game.
  12. u cant forward the same port to 2 computers behind 1 IP so 1 router, 2 LAN IP's same port cannot be forwarded to both. Mangos servers only require 2 ports to be forwarded, 3724 and 8085* *Unless you have selected custom ports, in which case simply forward those ports. im not familiar atall with trinity. I hosted 2 realms my server had the login and a realm my desktop had another realm. behind 1 router, which friends where able to connect to both realms without problems simply by having 8086 forwarded for the second realm.
  13. yeah, simply have the realmd database accessable to both servers this allows multiple computers (part of the thread title)
  14. within the mangos code there is a line that checks the DB versions... this code will make sure that you have a certain game client this code needs to be removed. You should have said you wanted to run different clients not i want to run classic wow, tbc and wotlk 3.x can still be run as "classic wow" if both expansions are disabled (expansion = 0 )
  15. and ofcourse your not ment to be using mangos to host private servers. If you want a perfect running server, keep with 2.4.3 for now. But majority of stuff on 3.x is sorted, few pieces here n there but it can all be easily fixed with updates that come very regularly from the awesome mangos dev's =)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use