Aseco on TMN

This forum is dedicated to the Aseco/Rasp 2 server records and control script by Flo and Assembler Maniac. Announcements and issues can be discussed in this forum.

Moderators: Flo, Assembler Maniac, f*ckfish, TM-Patrol

Post Reply
Kpaxian
pedestrian
pedestrian
Posts: 9
Joined: 06 Aug 2008 15:50
Owned TM-games: TMN TMNF TMU

Aseco on TMN

Post by Kpaxian » 14 Aug 2008 06:12

Hello, Im noob at the whole Aseco thing so please forgive if this is lame, but I am struggling to find help on this, particularly for linux.

I got a TMN dedicated linux server working no problem, and I downloaded 0.61b Aseco. I'm using a local database, which I set up with the aseco.sql file.

I got Aseco to work, but I had to do this to get it work:

I ran my TMN server via Shell
I ran Aseco.sh via Shell

Nothing happened... no messages are reported from Aseco. But if i go to my www/aseco/ folder, and try to load the page aseco.php, it seems to make Aseco start and I begin to see messages in game, and it records track records etc. When the web page loads it has a ton of errors.

Here are my questions:
Should running Aseco.sh on its own be enough to start Aseco?
Should I see records displayed on my website and in game or is Aseco 0.61b only for in game stuff?

Any help greatly appreciated. :)

Further to my stuff above, I get this on my aseco.log when I try to start Aseco.sh:

Fatal error: Call to undefined function: mysql_connect() in /var/www/aseco/plugins/plugin.localdatabase.php on line 59

Maybe its a clue? I tested mysql_connect() as a seperate function and it works, so I am really stuck :(

User avatar
J-S
happy cruiser
happy cruiser
Posts: 149
Joined: 24 Apr 2008 18:20
Owned TM-games: TMN,TMUF,TMO,TMS
Manialink(s): shark
Location: Grenoble - France
Contact:

Re: Aseco on TMN

Post by J-S » 14 Aug 2008 15:50

This message means that you haven't configure your db information ! Try to configure localdb.xml file :)

Kpaxian
pedestrian
pedestrian
Posts: 9
Joined: 06 Aug 2008 15:50
Owned TM-games: TMN TMNF TMU

Re: Aseco on TMN

Post by Kpaxian » 14 Aug 2008 17:21

ty, but the localdatabase.xml file is set correctly. Thats why I made a test page with this function. :?

Any other ideas?

nocturne
solid chaser
solid chaser
Posts: 1390
Joined: 08 Jun 2007 18:48
Owned TM-games: all
Contact:

Re: Aseco on TMN

Post by nocturne » 14 Aug 2008 19:07

You absolutely DO NOT want to run aseco from a public web folder! All anybody has to do is find the address, and they have all your passwords and connection settings. Aseco is a script meant to run in php cli -- it's not a webpage!

As far as the shell script goes, as long as it's in the same folder as aseco (or you configured it's proper path), then it should fire up aseco whether it's configured properly or not (would crash on errors, in any case), and it will run in the background and output to the stated log file. Perhaps since you have it located in a web directory, your host is automatically blocking it's execution, as having a SH file in a web directory is another big security mistake.

And just to make sure... you are talking about hosting a 'classic' tmn server, and not Trackmania Forever, right..? Also, are you familiar with the basic bash commands, like what's needed to get a pid and then end a process?

calsmurf2904
smooth traffic navigator
smooth traffic navigator
Posts: 199
Joined: 08 Jul 2008 15:23
Owned TM-games: TMNF,TMN
Location: Netherlands
Contact:

Re: Aseco on TMN

Post by calsmurf2904 » 14 Aug 2008 19:43

Kpaxian wrote: Fatal error: Call to undefined function: mysql_connect() in /var/www/aseco/plugins/plugin.localdatabase.php on line 59
it says that it can't find the mysql module for php...but if it work else....then you could check if you use the same php for aseco as for the other script ?
if you don't have the mysql module installed in php :
http://nl3.php.net/manual/en/mysql.installation.php
you have to recompile php...but if you have ubuntu (don't know with other distributions) :

Code: Select all

sudo apt-get install php5-mysql
this should install it automatically...you do need to have root access.
Image
Current Projects :
Aseco 2.x Dedimania plugin
Aseco 2.x Clan management Plugin
Servers :
LSR Race Server
Server Specs :
TmForever Server 2.11.16 05-08-08 (D-M-Y)
Xaseco 1.03 with FufiMenu and FufiWidgets

Kpaxian
pedestrian
pedestrian
Posts: 9
Joined: 06 Aug 2008 15:50
Owned TM-games: TMN TMNF TMU

Re: Aseco on TMN

Post by Kpaxian » 14 Aug 2008 20:26

hi nocturne thanks for clearing that up. the first installation was not located in my public web folder, and it just wrote the aseco log file and gave me the function error I mention above.

So then i tried it from the web folder just to see if i was missing the point and when I point my browser at aseco.php it forces the aseco to start on my game server - it appears to do everything it should. As soon as i close my browser it stops running. Okay, this isnt helping, but it proved to me that the database can work.

I am talking about classic TMN yes. I am quite new to Linux but I know enough to get by. Yes I know whats needed to get a PID and to end it. For example, to kill my TMN server, I write ps -A, find the PID for Trackmania and kill PID.

I am 100% convinced MySQL is installed and working correctly. Two reasons - I have other stuff using the database without any problems, and I can successfully connect to MySql using the mysql_connect() function in a test.

<?php
$link = mysql_connect('127.0.0.1', 'LOGIN', 'PASSWORD');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

I've looked at some other threads here that suggested I uncomment extension=php_mysql.so in my php.ini but that doesnt change anything.

I'm at the give up stage now :( I dont want fancy plugins or nothing, just want the server to remember the fastest time on a track.

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

Re: Aseco on TMN

Post by Assembler Maniac » 14 Aug 2008 21:02

Ok, so you have a file called test.php (or similar) containing the following, right?
<?php
$link = mysql_connect('127.0.0.1', 'LOGIN', 'PASSWORD');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>

From the shell, what happens if you do "php test.php" ?

Does it work?

If not, you might have multiple copies of the php.ini file on your drive. The command line of php is probably finding a different on than the web version.

You're obviously familiar enough with php & linux to troubleshoot, so you should be able to get this to work, it's just going to take some detective work to figure out why the command line php doesn't act the same as the web version.

If you use "php -v" from command line, what version does it show?
Create a test script with this in it:
<?php
echo phpinfo();
?>

Compare the results from a browser and the command line. Are the modules that are loaded the same for both?

Kpaxian
pedestrian
pedestrian
Posts: 9
Joined: 06 Aug 2008 15:50
Owned TM-games: TMN TMNF TMU

Re: Aseco on TMN

Post by Kpaxian » 15 Aug 2008 06:37

ok thanks Maniac :) I read what you said to try and I gave it a test, and sure enough there is a difference!!

So php on my web folder is running php5 and via Shell it's running php4! So you were right and I thank you very much for pointing me in the right direction.

Unfortunately I am getting into unknown territory when it comes to configuring php on linux so I will have to ask my mate who helps me run the server. I am confident it will work when i sort this out because the web test did prove that it can work. :1

Edit: Just to give the thread a happy ending - I went and reinstalled php5 with mysql, restarted apache2, and viola! All working nice now.

Post Reply