[Guide]Quick RANCP Installation

Status
Not open for further replies.
Newbie Spellweaver
Joined
Nov 6, 2006
Messages
83
Reaction score
43
MSSQL 2005 EXPRESS or MSSQL 2000 must be installed first and these
RanGame1
RanLog
RanShop
RanUser

databases are already attached before you proceed this setup

or in short , Making RAN Server Guide must be completed before you proceed this setup

======================================================
RanWeb Requirements:
======================================================
Install WAMP5 (Php engine is already included)


Install WAMP5 ZEND OPTIMIZER ADD ON


Cimed's RANCP


CONFIGURING WAMP5

1. After installing, Start WAMP5 server then click the icon on the tray icons
2. go to PHP settings menu > PHP extensions
ianotida - [Guide]Quick RANCP Installation - RaGEZONE Forums


3. scroll down , click the php_mssql on menu
ianotida - [Guide]Quick RANCP Installation - RaGEZONE Forums


- now WAMP5 server will automatically restart (not the PC)
- after restart now mssql is now enabled and your DONE



RANCP

Extract your rancp.zip on www folder (usually: C:\wamp\www )


CONFIGURE RANCP

Your config.php must look like this:

for Users using SQL 2005 EXPRESS
<?php
//
$CONFIG['servername'] = "IaNz Ran Online"; //Web Name
$CONFIG['dbaddress'] = "PCNAME\SQLEXPRESS"; //DB IP
$CONFIG['dbuser'] = "sa"; //DB ID
$CONFIG['dbpass'] = "1234"; //DB PASS
$CONFIG['dbdbname'] = "RanUser";
$CONFIG['dbdbname1'] = "RanGame1";
$CONFIG['dbdbname2'] = "RanShop";
$CONFIG['registration'] = "1";
$CONFIG['maxaccounts'] = "0";
$CONFIG['maxemail'] = "1";
$CONFIG['email'] = "0";
$CONFIG['emailaddress'] = "";
$CONFIG['emailsmtp'] = "";
$CONFIG['emailuser'] = "";
$CONFIG['emailpass'] = "";
?>

for Users using SQL 2000 Evaluation or SQL 2000 Enterprise Edition
<?php
//
$CONFIG['servername'] = "IaNz Ran Online"; //Web Name
$CONFIG['dbaddress'] = "PCNAME"; //DB IP
$CONFIG['dbuser'] = "sa"; //DB ID
$CONFIG['dbpass'] = "1234"; //DB PASS
$CONFIG['dbdbname'] = "RanUser";
$CONFIG['dbdbname1'] = "RanGame1";
$CONFIG['dbdbname2'] = "RanShop";
$CONFIG['registration'] = "1";
$CONFIG['maxaccounts'] = "0";
$CONFIG['maxemail'] = "1";
$CONFIG['email'] = "0";
$CONFIG['emailaddress'] = "";
$CONFIG['emailsmtp'] = "";
$CONFIG['emailuser'] = "";
$CONFIG['emailpass'] = "";
?>

After editing config.php, go to Internet explorer or Mozila Firefox
You can type localhost/rancp to see your rancp page

Note: WAMP5 automatically open all public IP available to use, so from IP 127.0.0.1 to public IP 192.xx.xx.xx whatever your IP its all set.
 

Attachments

  • ranc - [Guide]Quick RANCP Installation - RaGEZONE Forums
    rancp.webp
    73 KB · Views: 2,591
Last edited:
can you help me with this error:

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: SERVER\SQLEXPRESS in C:\wamp\www\rancp\function.php on line 37

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\wamp\www\rancp\function.php on line 38
 
Upvote 0
can you help me with this error:

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: SERVER\SQLEXPRESS in C:\wamp\www\rancp\function.php on line 37

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\wamp\www\rancp\function.php on line 38

replace mssql_connect() to mysql_connect()

mssql_select_db() to mysql_select_db()
 
Upvote 0
WAMP directory: C:\wamp\www\
RanCP directory: C:\wamp\www\rancp

The default WAMP site works fine. but when go to this this is the result

Warning: mssql_connect() [ ]: Unable to connect to server: SERVER\SQLEXPRESS in C:\wamp\www\rancp\function.php on line 37

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\wamp\www\rancp\function.php on line 38


replace mssql_connect() to mysql_connect()
mssql_select_db() to mysql_select_db()

function connectdb($db, $dbaddress, $dbuser, $dbpass) {
$dbconnect = mysql_connect ($dbaddress, $dbuser, $dbpass);
mysql_select_db ($db, $dbconnect) or die (mysql_error());
}

Result:

Warning: mysql_connect() [ ]: Unknown MySQL server host 'SERVER\SQLEXPRESS' (11004) in C:\wamp\www\rancp\function.php on line 37

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\rancp\function.php on line 38
Unknown MySQL server host 'SERVER\SQLEXPRESS' (11004)


I need a clear and working guide. This isnt only for pro, make it userfriendly and newbie friendly guide.
 
Upvote 0
WAMP directory: C:\wamp\www\
RanCP directory: C:\wamp\www\rancp

The default WAMP site works fine. but when go to this this is the result

Warning: mssql_connect() [ ]: Unable to connect to server: SERVER\SQLEXPRESS in C:\wamp\www\rancp\function.php on line 37

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\wamp\www\rancp\function.php on line 38




function connectdb($db, $dbaddress, $dbuser, $dbpass) {
$dbconnect = mysql_connect ($dbaddress, $dbuser, $dbpass);
mysql_select_db ($db, $dbconnect) or die (mysql_error());
}

Result:

Warning: mysql_connect() [ ]: Unknown MySQL server host 'SERVER\SQLEXPRESS' (11004) in C:\wamp\www\rancp\function.php on line 37

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\wamp\www\rancp\function.php on line 38
Unknown MySQL server host 'SERVER\SQLEXPRESS' (11004)


I need a clear and working guide. This isnt only for pro, make it userfriendly and newbie friendly guide.

try to change SERVER\SQLEXPRESS to localhost..
 
Upvote 0
I have this error,

Warning: mssql_connect() [ ]: Unable to connect to server: ATHLON4800X2\SQLEXPRESS in C:\wamp\www\ran\function.php on line 37

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\wamp\www\ran\function.php on line 38


 
Upvote 0
try to change SERVER\SQLEXPRESS to localhost..

huh? Local Host? are you sure?

This is what's on the guide.

$CONFIG['servername'] = "Ran-Shop"; //Web Name
$CONFIG['dbaddress'] = "SERVER\SQLEXPRESS"; //DB IP
$CONFIG['dbuser'] = "sa"; //DB ID
$CONFIG['dbpass'] = "1234"; //DB PASS

You want me to replace it with LocalHost?? SURE??????


Result of your GUESS:

$CONFIG['servername'] = "Ran-Shop"; //Web Name
$CONFIG['dbaddress'] = "LocalHost"; //DB IP
$CONFIG['dbuser'] = "sa"; //DB ID
$CONFIG['dbpass'] = "1234"; //DB PASS

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: LocalHost in C:\wamp\www\rancp\function.php on line 37

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\wamp\www\rancp\function.php on line 38


Your just making a guess right?
 
Upvote 0
huh? Local Host? are you sure?

This is what's on the guide.

$CONFIG['servername'] = "Ran-Shop"; //Web Name
$CONFIG['dbaddress'] = "SERVER\SQLEXPRESS"; //DB IP
$CONFIG['dbuser'] = "sa"; //DB ID
$CONFIG['dbpass'] = "1234"; //DB PASS

You want me to replace it with LocalHost?? SURE??????


Result of your GUESS:

$CONFIG['servername'] = "Ran-Shop"; //Web Name
$CONFIG['dbaddress'] = "LocalHost"; //DB IP
$CONFIG['dbuser'] = "sa"; //DB ID
$CONFIG['dbpass'] = "1234"; //DB PASS

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: LocalHost in C:\wamp\www\rancp\function.php on line 37

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in C:\wamp\www\rancp\function.php on line 38


Your just making a guess right?

you're not using mssql server so use this
$conn = mysql_connect("localhost","root","pass");
$db = mysql_select_db("database");

While localhost is the "ServerName" and root is the dbUsername, pass is the dbPassword and database is the dbName
because wamp has mysql server not mssql server
 
Upvote 0
you're not using mssql server so use this
$conn = mysql_connect("localhost","root","pass");
$db = mysql_select_db("database");

While localhost is the "ServerName" and root is the dbUsername, pass is the dbPassword and database is the dbName
because wamp has mysql server not mssql server

How do you know that im not using MSSQL server? my server is running perfectly error free 6months, except for this RANCP installation.

ianotida - [Guide]Quick RANCP Installation - RaGEZONE Forums


Please give the instructions properly, your giving me a statement without telling me where to put it.
Where do you want me to put it? function.php? config.php?

function connectdb($db, $dbaddress, $dbuser, $dbpass) {
$dbconnect = mssql_connect ($dbaddress, $dbuser, $dbpass);
mssql_select_db ($db, $dbconnect) or die (mysql_error());
}

so its gonna be like this?

function connectdb($db, $dbaddress, $dbuser, $dbpass) {
$conn = mysql_connect("SERVER\SQLEXPRESS","sa","1234");
mssql_select_db ($db, $dbconnect) or die (mysql_error());
$db = mysql_select_db("RanShop");
}


RESULT:

Warning: mysql_connect() [ ]: Unknown MySQL server host 'SERVER\SQLEXPRESS' (11004) in C:\wamp\www\rancp\function.php on line 38

Warning: mysql_select_db() [ ]: Can't connect to MySQL server on 'localhost' (10061) in C:\wamp\www\rancp\function.php on line 39

Warning: mysql_select_db() [ ]: A link to the server could not be established in C:\wamp\www\rancp\function.php on line 39

Warning: mssql_query() [ ]: Unable to connect to server: (null) in C:\wamp\www\rancp\function.php on line 6

Warning: mssql_query() [ ]: A link to the server could not be established in C:\wamp\www\rancp\function.php on line 6

Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in C:\wamp\www\rancp\function.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\rancp\function.php:38) in C:\wamp\www\rancp\function.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\rancp\function.php:38) in C:\wamp\www\rancp\function.php on line 177

Wow more problem..
 

Attachments

  • 1 - [Guide]Quick RANCP Installation - RaGEZONE Forums
    1.webp
    13.1 KB · Views: 3,903
Upvote 0
How do you know that im not using MSSQL server? my server is running perfectly error free 6months, except for this RANCP installation.

ianotida - [Guide]Quick RANCP Installation - RaGEZONE Forums


Please give the instructions properly, your giving me a statement without telling me where to put it.
Where do you want me to put it? function.php? config.php?

function connectdb($db, $dbaddress, $dbuser, $dbpass) {
$dbconnect = mssql_connect ($dbaddress, $dbuser, $dbpass);
mssql_select_db ($db, $dbconnect) or die (mysql_error());
}

so its gonna be like this?

function connectdb($db, $dbaddress, $dbuser, $dbpass) {
$conn = mysql_connect("SERVER\SQLEXPRESS","sa","1234");
mssql_select_db ($db, $dbconnect) or die (mysql_error());
$db = mysql_select_db("RanShop");
}


RESULT:

Warning: mysql_connect() [ ]: Unknown MySQL server host 'SERVER\SQLEXPRESS' (11004) in C:\wamp\www\rancp\function.php on line 38

Warning: mysql_select_db() [ ]: Can't connect to MySQL server on 'localhost' (10061) in C:\wamp\www\rancp\function.php on line 39

Warning: mysql_select_db() [ ]: A link to the server could not be established in C:\wamp\www\rancp\function.php on line 39

Warning: mssql_query() [ ]: Unable to connect to server: (null) in C:\wamp\www\rancp\function.php on line 6

Warning: mssql_query() [ ]: A link to the server could not be established in C:\wamp\www\rancp\function.php on line 6

Warning: mssql_num_rows(): supplied argument is not a valid MS SQL-result resource in C:\wamp\www\rancp\function.php on line 7

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\rancp\function.php:38) in C:\wamp\www\rancp\function.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\rancp\function.php:38) in C:\wamp\www\rancp\function.php on line 177

Wow more problem..

awt i thought you are using my sql server because this thread is for my sql server bro. can you attach your function.php and query.php?? i will check it for you.

and make sure that you are using mix mode auth. in your ms sql server okei?
 
Upvote 0
and make sure that you are using mix mode auth. in your ms sql server okei?

As what I have said I have a working Ran Server, and I have setup my ODBC successfully.

awt i thought you are using my sql server because this thread is for my sql server bro. can you attach your function.php and query.php?? i will check it for you.

Try to read from the top.

================================================== ====
RanWeb Requirements:
================================================== ====

MSSQL 2005 EXPRESS or 2000 must be installed first before you proceed
this setup

Install WAMP5 (Php engine is already included)
PHP5 APACHE MYSQL for Windows : install WAMP5

3. scroll down , click the php_mssql on menu

So this guide is wrong?

Anyway here is the .php files

config.php
<?php
// RaGEZONE.com
$CONFIG['servername'] = "Ran-Shop"; //Web Name
$CONFIG['dbaddress'] = "192.168.0.114"; //DB IP
$CONFIG['dbuser'] = "sa"; //DB ID
$CONFIG['dbpass'] = "1234"; //DB PASS
$CONFIG['dbdbname'] = "RanUser";
$CONFIG['dbdbname1'] = "RanGame1";
$CONFIG['dbdbname2'] = "RanShop";
$CONFIG['registration'] = "1";
$CONFIG['maxaccounts'] = "0";
$CONFIG['maxemail'] = "1";
$CONFIG['email'] = "0";
$CONFIG['emailaddress'] = "";
$CONFIG['emailsmtp'] = "";
$CONFIG['emailuser'] = "";
$CONFIG['emailpass'] = "";
?>

function.php
<?php
// RaGEZONE.com
function checkcookie($where, $cookieuser, $cookiepass, $dbname, $sqladdress, $sqluser, $sqlpass) {
connectdb($dbname,$sqladdress, $sqluser, $sqlpass);
if($where==0) {
$result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
$rows=mssql_num_rows($result);
if ($rows>0) {
$rows=mssql_fetch_assoc($result);
extract($rows);
$password = ($UserPass);
if ($password == $cookiepass) {
quickrefresh('home.php');
} else {
resetcookies();
}
} else {
resetcookies();
}
} elseif($where==1) {
$result = mssql_query(sprintf(SELECT_USER_PASS, $cookieuser));
$rows=mssql_num_rows($result);
if ($rows>0) {
$rows=mssql_fetch_assoc($result);
extract($rows);
$password = ($UserPass);
if($password != $cookiepass) {
notloggedin();
}
} else {
notloggedin();
}
}
}

// Suggested Statement
function connectdb($db, $dbaddress, $dbuser, $dbpass) {
$conn = mysql_connect("192.168.0.114",sa,1234);
$db = mysql_select_db("RanShop");
}

// Original Statement /////////////////////////////////////////
//
// function connectdb($db, $dbaddress, $dbuser, $dbpass) {
// $dbconnect = mssql_connect ($dbaddress, $dbuser, $dbpass);
// mssql_select_db ($db, $dbconnect) or die (mysql_error());
// }
/////////////////////////////////////////////////////////////////////

function getmicrotime() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}

function delayedrefresh($page) {
echo "<meta http-equiv='refresh' content='3; URL={$page}'>";
}

~~~~ blah blah blah to make this post short ~~~~
 
Upvote 0
this is my error

Parse error: syntax error, unexpected T_DNUMBER, expecting T_VARIABLE or '$' in C:\wamp\www\rancp\function.php on line 4

plss help me to some big problem thx
 
Upvote 0
Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\rancp\config.php:2) in C:\wamp\www\rancp\function.php on line 169

Warning: Cannot modify header information - headers already sent by (output started at C:\wamp\www\rancp\config.php:2) in C:\wamp\www\rancp\function.php on line 170

PROBLEM SOLVED. ^_^!!
 
Last edited:
Upvote 0
Status
Not open for further replies.
Back