Problem

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

dor396
road tourist
road tourist
Posts: 80
Joined: 02 Mar 2009 13:20
Owned TM-games: TMNF

Problem

Post by dor396 » 19 Jul 2009 17:29

I have a problem with connecting to the datebase

Code: Select all

# initialize XASECO ############################################################
[XAseco] PHP Version is 5.1.6 on Linux
[XAseco] Load settings [config.xml]
[XAseco] Load admin/ops lists [adminops.xml]
[XAseco] Load banned IPs list [bannedips.xml]
[XAseco] Load plugins list [plugins.xml]
[XAseco] Load plugin [plugin.localdatabase.php]
[XAseco] Load plugin [plugin.rounds.php]
[XAseco] Load plugin [chat.admin.php]
[XAseco] Load plugin [chat.help.php]
[XAseco] Load plugin [chat.records.php]
[XAseco] Load plugin [chat.records2.php]
[XAseco] Load plugin [chat.recrels.php]
[XAseco] Load plugin [chat.dedimania.php]
[XAseco] Load plugin [chat.players.php]
[XAseco] Load plugin [chat.players2.php]
[XAseco] Load plugin [chat.wins.php]
[XAseco] Load plugin [chat.laston.php]
[XAseco] Load plugin [chat.stats.php]
[XAseco] Load plugin [chat.server.php]
[XAseco] Load plugin [chat.song.php]
[XAseco] Load plugin [chat.me.php]
[XAseco] Load plugin [plugin.tmxinfo.php]
[XAseco] Load plugin [plugin.sminfo.php]
[XAseco] Load plugin [plugin.track.php]
[XAseco] Load plugin [plugin.checkpoints.php]
[XAseco] Load plugin [plugin.dedimania.php]
[XAseco] Load plugin [plugin.rasp.php]
[XAseco] Load plugin [plugin.rasp_jukebox.php]
[XAseco] Load plugin [plugin.rasp_chat.php]
[XAseco] Load plugin [plugin.rasp_karma.php]
[XAseco] Load plugin [plugin.rasp_nextmap.php]
[XAseco] Load plugin [plugin.rasp_nextrank.php]
[XAseco] Load plugin [plugin.rasp_votes.php]
[XAseco] Load plugin [plugin.chatlog.php]
[XAseco] Load plugin [plugin.style.php]
[XAseco] Load plugin [plugin.panels.php]
[XAseco] Load plugin [plugin.uptodate.php]
[XAseco] Load plugin [jfreu.plugin.php]
[XAseco] Load plugin [mistral.idlekick.php]
[XAseco] Try to connect to TM dedicated server on 127.0.0.1:5555
[XAseco] Try to authenticate with login 'SuperAdmin' and password '******'
[XAseco] Connection established successfully !
[Local DB] Load settings file
[Local DB] Try to connect to MySQL server on 'x.x.x.x' with database 'games_tmn1'
PHP Fatal error:  Call to undefined function mysql_connect() in /home/tmn/server1/xaseco/plugins/plugin.localdatabase.php on line 72

help me please!
:thumbsup:
Last edited by dor396 on 18 Jun 2010 22:13, edited 1 time in total.
Israeli Community Mannager.
Image

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: Problem

Post by nouseforname » 19 Jul 2009 18:01

check ur settings in localdatabase.xml

and if ur mysql server is on the same machine as server use "localhost" as ip or "127.0.0.1".
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

dor396
road tourist
road tourist
Posts: 80
Joined: 02 Mar 2009 13:20
Owned TM-games: TMNF

Re: Problem

Post by dor396 » 19 Jul 2009 18:27

nouseforname wrote:check ur settings in localdatabase.xml

and if ur mysql server is on the same machine as server use "localhost" as ip or "127.0.0.1".
this is my localdatabase.xml

Code: Select all


<?xml version="1.0" encoding="utf-8" ?>
<settings>
	<!-- MySQL Server Settings -->
	<mysql_server>1*5.*.14*.*</mysql_server>
	<mysql_login>***</mysql_login>
	<mysql_password>***</mysql_password>
	<mysql_database>***</mysql_database>
	<!-- Do you want XASECO to display newly driven records? -->
	<display>true</display>
	<!-- Limit the highest record that will be displayed to all? -->
	<!-- If lower than $maxrecs, records above this limit will -->
	<!-- only be displayed to the pertaining player -->
	<limit>100</limit>

	<messages>
		<!-- record messages -->
		<record_new>{#server}>> {#highlite}{1}{#record} secured his/her {#rank}{2}{#record}. Local Record!  {3}: {#highlite}{4}{#record} $n({#rank}{5}{#highlite}{6}{#record})</record_new>
		<record_equal>{#server}>> {#highlite}{1}{#record} equaled his/her {#rank}{2}{#record}. Local Record!  {3}: {#highlite}{4}</record_equal>
		<record_new_rank>{#server}>> {#highlite}{1}{#record} gained the {#rank}{2}{#record}. Local Record!  {3}: {#highlite}{4}{#record} $n({#rank}{5}{#highlite}{6}{#record})</record_new_rank>
		<record_first>{#server}>> {#highlite}{1}{#record} claimed the {#rank}{2}{#record}. Local Record!  {3}: {#highlite}{4}</record_first>
	</messages>
</settings>


Israeli Community Mannager.
Image

nouseforname
swift roadking
swift roadking
Posts: 840
Joined: 20 Apr 2008 08:58
Owned TM-games: TMUF,TMNF, TMN
Manialink(s): therookies
Location: Germany
Contact:

Re: Problem

Post by nouseforname » 19 Jul 2009 19:36

so, you are using an external database?
Owner of the Rookie servers and some more. :)
Rookies HP
My Project
Rookies Manialinkcolor>

dor396
road tourist
road tourist
Posts: 80
Joined: 02 Mar 2009 13:20
Owned TM-games: TMNF

Re: Problem

Post by dor396 » 19 Jul 2009 19:44

nouseforname wrote:so, you are using an external database?
YES
Israeli Community Mannager.
Image

corto-72
smooth traffic navigator
smooth traffic navigator
Posts: 284
Joined: 28 Jul 2008 16:12
Owned TM-games: TMUF
Location: Toulouse
Contact:

Re: Problem

Post by corto-72 » 20 Jul 2009 06:36

It's all in the error thrown by the script...

Code: Select all

PHP Fatal error:  Call to undefined function mysql_connect() in 
mysql php modules are not enabled by default anymore... are you sure they are in your setup??

dor396
road tourist
road tourist
Posts: 80
Joined: 02 Mar 2009 13:20
Owned TM-games: TMNF

Re: Problem

Post by dor396 » 20 Jul 2009 09:48

corto-72 wrote:It's all in the error thrown by the script...

Code: Select all

PHP Fatal error:  Call to undefined function mysql_connect() in 
mysql php modules are not enabled by default anymore... are you sure they are in your setup??
yes they are
Israeli Community Mannager.
Image

User avatar
El Fuego
solid chaser
solid chaser
Posts: 1097
Joined: 27 Oct 2006 11:00
Owned TM-games: TMUF, TM2 C/S
Location: Nae too far frae Glesgie
Contact:

Re: Problem

Post by El Fuego » 20 Jul 2009 14:47

Code: Select all

<?php
$conn = mysql_connect ("server", "user", "passwd") or die ("Could not connect: " . mysql_error());
$db = mysql_select_db ("dbname") or die ("Could not select database: " . mysql_error());

echo "ALL DONE OK";
?>
Save the above as a PHP file - e.g. test.php - (editing as necessary) in your local webroot folder (C:\inetpub\wwwroot for Windows IIS) and run it in your browser (http://localhost/test.php) - what do you get?
Cheers!
.FUEY.
Diary Of A Mad Man

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: Problem

Post by Assembler Maniac » 20 Jul 2009 15:33

Then try this one (create an info.php file):

<?php
echo phpinfo();
?>

In the browser you'll see the ini file that's actually being used as well as any extensions that are being loaded. If mysql isn't in the extension list, that's why it's not working.

You'll need to check the real .ini file that's being used to make sure the extensions are being loaded.

schmidi
smooth traffic navigator
smooth traffic navigator
Posts: 196
Joined: 15 Jul 2008 22:25
Owned TM-games: tmo, tms, tmuf

Re: Problem

Post by schmidi » 20 Jul 2009 18:20

Assembler Maniac wrote:In the browser you'll see the ini file that's actually being used as well as any extensions that are being loaded.
don't test it only in browser, php.ini for cgi and cli might be different.

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: Problem

Post by Assembler Maniac » 20 Jul 2009 19:40

schmidi wrote:
Assembler Maniac wrote:In the browser you'll see the ini file that's actually being used as well as any extensions that are being loaded.
don't test it only in browser, php.ini for cgi and cli might be different.
Damn, good point.

To test from command line, you can do "php info.php | more" and look through the results that way.

Seader
road tourist
road tourist
Posts: 104
Joined: 30 May 2007 12:28
Owned TM-games: TM, TMS, TMUF

Re: Problem

Post by Seader » 20 Jul 2009 20:32

Code: Select all

<settings>
   <!-- MySQL Server Settings -->
   <mysql_server>1*5.*.14*.*</mysql_server>
   <mysql_login>***</mysql_login>
isn't the port of the mysql server necessary here...? so that it looks like

Code: Select all

<settings>
   <!-- MySQL Server Settings -->
   <mysql_server>1*5.*.14*.*:3306</mysql_server>
   <mysql_login>***</mysql_login>
...? and the ip which you want connect to once is 1*5.*.14*.*, and another time 213.8.254.136; anyway, i'm not sure if the port is not needed here...

Assembler Maniac
Pit Crew
Pit Crew
Posts: 1493
Joined: 03 Jun 2006 13:24
Owned TM-games: TMU
Contact:

Re: Problem

Post by Assembler Maniac » 21 Jul 2009 02:52

Port is only needed if it's NOT 3306 OR it's set as the right default port in the mysql.ini file.
Seader wrote:

Code: Select all

<settings>
   <!-- MySQL Server Settings -->
   <mysql_server>1*5.*.14*.*</mysql_server>
   <mysql_login>***</mysql_login>
isn't the port of the mysql server necessary here...? so that it looks like

Code: Select all

<settings>
   <!-- MySQL Server Settings -->
   <mysql_server>1*5.*.14*.*:3306</mysql_server>
   <mysql_login>***</mysql_login>
...? and the ip which you want connect to once is 1*5.*.14*.*, and another time 213.8.254.136; anyway, i'm not sure if the port is not needed here...

Seader
road tourist
road tourist
Posts: 104
Joined: 30 May 2007 12:28
Owned TM-games: TM, TMS, TMUF

Re: Problem

Post by Seader » 21 Jul 2009 20:48

look if there is a php.ini in ?:\program files\php\(php.ini); that's the one you have to change for accepting / establishing mysql connections.
but as there is no feedback from your side 'til now, may be you solved it anyway...?

@A.M.: thx ;)

dor396
road tourist
road tourist
Posts: 80
Joined: 02 Mar 2009 13:20
Owned TM-games: TMNF

Re: Problem

Post by dor396 » 21 Jul 2009 22:19

what the port in direct admin ?
anyone know ?
Israeli Community Mannager.
Image

Post Reply