its been a while i try to ake this work but i just can't!
here is my www/main/inc/config.php file:
---------------------------------------------------------------------
//Database
//////////
$dbhost="localhost/127.0.0.1"; //Host/IP from the MySQL Database
$dbname="l2jdb"; //Name of Database (in many times it is 'l2jdb')
$dbuser="root"; //Username to the MySQL Database
$dbpass=""; //Passwort to the MySQL Database
$config['config_script_name']="Private Server"; //Here you can wrote you name from the Homepage / Clan or something.
//It will be displayed on the Top
$config['config_map_quality']="middle"; //Quality of the Map and size
//"low" = Low quality and size (this can reduce the traffic of the server)
//"middle" = Middle quality and size (this looks good on 1280x1024 resolution)
//"high" = High quality and size (this is a detailed map but more traffic)
//
//Notice: Whole-Map is always "low" quality
$config['server_path']="C:/server/l2j/data/announcements.txt"; //Full path to the announcements.txt.
//example:
//Windows = C:/server/l2j-server/data/announcements.txt
//Linux = /usr/server/l2j-server/data/announcements.txt
///////////////////////////////////////////////////////////////////////////////////////////////////
//Dont edit behind this line///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
$verbindung=MYSQL_CONNECT($dbhost,$dbuser,$dbpass) or die ("Datenbankserver nicht erreichbar");
MYSQL_SELECT_DB($dbname) or die ("Datenbank nicht vorhanden");
$get_config_data="SELECT online FROM characters WHERE online>0";
$config_data=MYSQL_QUERY($get_config_data);
$config['num_online']=mysql_num_rows($config_data);
//$handle = fopen("http://www.whatismyip.com/", "r");
//$contents = '';
//while (!feof($handle)){$contents .= fread($handle, 8192);**
//fclose($handle);
//preg_match( "/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/", $contents, $matches );
//$config['server_ip']=$matches[0];
$config['127.0.0.1/localhost']=$_SERVER["localhost/127.0.0.1"];
error_reporting(0);
$IP = array(
"login_server" => "193.92.230.78:2106",
"game_server" => "193.92.230.78:7777",
);
while(list($ServerName,$Host)=each($IP))
{
list($IPAddress,$Port)=explode(":",$Host);
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5))
{
$config[$ServerName]="<font color=\"#00ff00\">Online</font>";
fclose($fp);
**else{
$config[$ServerName]="<font color=\"#ff0000\">Offline</font>";
**
**
mysql_close($verbindung);
?>
=======================================================
and here is the error i get:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/jimtre8.coconia.net/www/main/inc/config.php on line 45
Datenbankserver nicht erreichbar
HELP!!!! i tried every combimation!:toilet_cl
here is my www/main/inc/config.php file:
---------------------------------------------------------------------
//Database
//////////
$dbhost="localhost/127.0.0.1"; //Host/IP from the MySQL Database
$dbname="l2jdb"; //Name of Database (in many times it is 'l2jdb')
$dbuser="root"; //Username to the MySQL Database
$dbpass=""; //Passwort to the MySQL Database
$config['config_script_name']="Private Server"; //Here you can wrote you name from the Homepage / Clan or something.
//It will be displayed on the Top
$config['config_map_quality']="middle"; //Quality of the Map and size
//"low" = Low quality and size (this can reduce the traffic of the server)
//"middle" = Middle quality and size (this looks good on 1280x1024 resolution)
//"high" = High quality and size (this is a detailed map but more traffic)
//
//Notice: Whole-Map is always "low" quality
$config['server_path']="C:/server/l2j/data/announcements.txt"; //Full path to the announcements.txt.
//example:
//Windows = C:/server/l2j-server/data/announcements.txt
//Linux = /usr/server/l2j-server/data/announcements.txt
///////////////////////////////////////////////////////////////////////////////////////////////////
//Dont edit behind this line///////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
$verbindung=MYSQL_CONNECT($dbhost,$dbuser,$dbpass) or die ("Datenbankserver nicht erreichbar");
MYSQL_SELECT_DB($dbname) or die ("Datenbank nicht vorhanden");
$get_config_data="SELECT online FROM characters WHERE online>0";
$config_data=MYSQL_QUERY($get_config_data);
$config['num_online']=mysql_num_rows($config_data);
//$handle = fopen("http://www.whatismyip.com/", "r");
//$contents = '';
//while (!feof($handle)){$contents .= fread($handle, 8192);**
//fclose($handle);
//preg_match( "/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/", $contents, $matches );
//$config['server_ip']=$matches[0];
$config['127.0.0.1/localhost']=$_SERVER["localhost/127.0.0.1"];
error_reporting(0);
$IP = array(
"login_server" => "193.92.230.78:2106",
"game_server" => "193.92.230.78:7777",
);
while(list($ServerName,$Host)=each($IP))
{
list($IPAddress,$Port)=explode(":",$Host);
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5))
{
$config[$ServerName]="<font color=\"#00ff00\">Online</font>";
fclose($fp);
**else{
$config[$ServerName]="<font color=\"#ff0000\">Offline</font>";
**
**
mysql_close($verbindung);
?>
=======================================================
and here is the error i get:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/jimtre8.coconia.net/www/main/inc/config.php on line 45
Datenbankserver nicht erreichbar
HELP!!!! i tried every combimation!:toilet_cl