The online racing simulator
PHP4/5, MySQL - HoT Tracker - PB/HL tracker, online racers, host status and more ...
(64 posts, started )
PHP4/5, MySQL - HoT Tracker - PB/HL tracker, online racers, host status and more ...
Dear Racers,

all's well that ends well. At least I hope so with regard to the new HoT Tracker.

Here it is - maybe it's not yet where I want it to be once, but at least you have something that should be working and useful.

The HoT Tracker is basically a package of PHP scripts providing a framework to access LFS World information and display them easily on any web site. Up to now, the HoT Tracker provides you with lists of online racers, host status and - of course - the tracker list, i.e. the list of personal bests / hotlaps for a given car/track combination.

The installation of the HoT Tracker should be quite easy, but requires a web space with PHP and MySQL support. Apart from that you also need a valid LFS World Pubstats Access ID Key to retrieve any data from LFS World.

If you do not fulfill these requirements, you might as well use any existing HoT Tracker installation as service provider - of course this requires the IP of your web space to be unlocked in the specific installation.

For example in the German Gamers Club we have several LFS teams (Hell on Tyres, Rising Suns Motorsports, ...). There's one central installation of the tracker at http://tracker.g-g-c.de which the teams could use as service provider.

Nearly all features and data of the tracker can be maintained via a web interface (the so-called control center).

For more information on the tracker, consider the documentation (which is contained in the ZIP) or download the package and try it out.

The HoT Tracker download link is: http://upload.g-g-c.de/tracker/hottracker.zip

The HoT Tracker documentation can be found at: http://upload.g-g-c.de/tracker/documentation.pdf

EDIT: Updated the documentation (data directory must allow write access). Added default server configuration and a style for the serverstatus. Removed the .sql-file (which is not needed, since the tracker creates the tables itself).

EDIT 26.03.09: Uploaded new ZIP. Now the various Notices should be gone. Several bugs fixed. MySQL tables will now be created with indizes for faster access (if you update, you should drop all tracker tables first, sorry for the inconvenience)

EDIT 09.04.09:Uploaded the latest version of the tracker and removed the beta tag.


EDIT 14.06.09:Fixed some character-encoding problems in connection to MySQL DB. Characters like "ü" where not written to DB correctly.

Best regards and have fun,

Timo

PS: I will try to give some support and if you have questions you can post them right here. However, at least for the german community (and for the english speaking folks I would also recommend this) there is the Official Support Forum within the GGC Forums. Please use that forum over there because I will most likely not check out all forums frequently.

But of course I will keep this thread up-to-date whenever there are new releases or any other important news.
#2 - Silox
I can't wait for it

Keep up the good work!
Scweet!
It's done ... for now. Have fun and be gentle
I just saw that there is a default server configuration missing in the the ZIP. I will add this tonight.
Hi,

unfortunately i get an error after uploading the files and running controlcenter.php for the first time:

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in .../sdk/model/hottrackerdb.php on line 33

I am using PHP v4.4.8 and 5.2.5, MySQL v5.0.51a

Thanks for any help.
Can you check if you have forgotten any " when you edited the config.php?

As far as I can see, there's no error in the code at the line. But PHP often is kind of "silly", which here could mean that in fact it could be a mistake in the config.php, which is included in hottrackkerdb.php. PHP supports double- and single quotes for strings.

And the config.php is the only file that needs manual changes, so I would strongly recommend taking a very close look on the syntax of the parts that you entered there (which should be the definition of the constants LINKBASE, IDKEY and the MySQL stuff).

It could also be a good idea to edit the config.php in an editor with syntax highlighting.

If this doesn't solve your problem, we can discuss further.
Hi,

thanks for the quick response.
To be on the safe side, i downloaded the zip again, edited config.php, double and triple checked the edits, re-uploaded it to the webserver and still get the same error message.
I am using psPad to edit config.php and everything looks fine - i should be smart enough to do the few necessary edits, but still no joy.
I hope we can resolve this.
Thanks for your time.
Too bad. That would have been the easy way (and I didn't want to hurt your feelings, I think everyone using the tracker has to be very smart ).

I will try it tomorrow myself on my private homepage. (Unfortunately I have to race now in the City Liga).

@Community: Has anyone else experienced similar problems?

EDIT: A quick googling let's me think it could be a PHP4 problem. Might well be that you have to use PHP5 for the tracker (I really didn't take too much care about PHP versions ...) You have written above, that you also have PHP5 available? (At the GGC we have version 5.2.6 and it runs fine, just installed yesterday)

EDIT: If this is the case, I will try to find out what causes the incompatibility with PHP4. But I cannot guarantee that I can change it (but I will try). Might well be that we have to rename this thread into PHP5 only ...
Quote from FM-Failure :Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in .../sdk/model/hottrackerdb.php on line 33

Quote from HorsePower :As far as I can see, there's no error in the code at the line

33 private $dblink,

PHP 4 does not support access modifiers such as "private".
Thanks for the info, that is easily changed ...

EDIT: Ok, removed the private keyword for class variables ... no time to do it for the methods. I will take a more thorough look at the weekend.
Don't work me to, but error is different.
I do this:
1. download zip + pdf
2. change options/config.php (link, pubstat, mysql)
3. upload full hottracker folder
4. change folder data chmod 777
5. open url http://mydomain/~myname/lfs/hottracker/controlcenter.php
6. Before "Set Password for Super User 'super'" is Notice: Undefined offset: 0 in /home/username/public_html/lfs/hottracker/sdk/model/hottrackerdb.php on line 429
7. Insert eMail and 2x password and error:
The requested URL /~username/lfs/hottracker/<br />Notice: Undefined variable: PHP_SELF in /home/username/public_html/lfs/hottracker/sdk/model/logon.php on line <b>118</b> was not found on this server.

Result:
1. user 'super' not added to mysql
2. mysql tables added
3. error text in IE7 on address bar and FF two places address bar and website

I checked this line 118 in logon.php and this is <form action"">

<?php 
echo($PHP_SELF); if ($go_back) echo('?back'); 
?>

I use usually

<?php 
echo $_SERVER['PHP_SELF']; 
?>

but this don't work at all.

My software
Linux 2.6.27.15-170.2.24.fc10.i686 (Fedora 10)
php-5.2.6-5.i386
httpd-2.2.10-2.i386
mysql-5.0.67-2.fc10.i386

Perhaps this help.

Okram

Sorry my english.
The $_SERVER["PHP_SELF"] should work, can you replace the $PHP_SELF by $_SERVER["PHP_SELF"], please?

As far as I know the $PHP_SELF is not always defined ...

If this works, I will fix it soon.
Quote from HorsePower :The $_SERVER["PHP_SELF"] should work, can you replace the $PHP_SELF by $_SERVER["PHP_SELF"], please?

As far as I know the $PHP_SELF is not always defined ...

If this works, I will fix it soon.

... You could extract that data from the $_SERVER array and push into the scope of the document that way.
Quote from HorsePower :The $_SERVER["PHP_SELF"] should work, can you replace the $PHP_SELF by $_SERVER["PHP_SELF"], please?

As far as I know the $PHP_SELF is not always defined ...

If this works, I will fix it soon.

was

<?php 
 
<form method="post" action="echo($PHP_SELF); if ($go_back) echo('?back'); ">
?>

works

<?php 
<form method="post" action="echo($_SERVER["PHP_SELF"]); if ($go_back) echo('?back'); ">
?>

I see notices:
Notice: Undefined variable: errormsg in /home/username/public_html/lfs/hottracker/sdk/model/logon.php on line 146

Notice: Undefined variable: TrackerSDKPremium in /home/username/public_html/lfs/hottracker/sdk/hottrackerui.php on line 35

Notice: Undefined variable: base_dir in /home/username/public_html/lfs/hottracker/controlcenter.php on line 46


After login (i changed <form action> in login form) i see 16x:

Notice: Use of undefined constant locked - assumed 'locked' in /home/username/public_html/lfs/hottracker/sdk/model/hottrackerdb.php on line 440

and this

Notice: Undefined variable: TrackerSDKPremium in /home/username/public_html/lfs/hottracker/sdk/hottrackerui.php on line 35

Notice: Undefined variable: base_dir in /home/username/public_html/lfs/hottracker/controlcenter.php on line 46

Okram
Wow, I would not have expected that many issues. You seem to have quite a special system there. But it's good, because it reveals all the potential errors.

I'll check it tonight or tomorrow ... If we can get this running for you, it seems to me that we can run it on any server ...
I must admit I'm not a real PHP guru ... I learn quite a lot about PHP these days.

First of all, I sort of hate PHP since it allows for using variables that have not been defined before. In fact, it depends on the individual setup of the PHP environment if someone even notices that he does something which is in principle "not clean".

On the other hand, PHP doesn't support explicit programming such as declaring class variables as private, which obviously is allowed only since PHP5.

Well, now I have to deal with that unfortunately.

I never got these notices (because the two servers that I used for testing didn't show me the messages or I was just to dumb to find them).

I will try to make sure that every variable I use in the scripts is defined when it is used first. But this will take some time (at least until the weekend) and some testing.

I would appreciate your help then, Okram.

I will upload an updated ZIP for the PHP_SELF issue later on.

Thanks again,

Timo

EDIT: Ok, I have set error_reporting to E_ALL for my private installation, which should allow me to find all notices and fix them.

(Seems the BETA Phase is working as it should).
I already cleaned the code up alot, so at the weekend I will upload a new ZIP, so that also you, Okram, should be able to use the tracker without getting the notices all the time.

In fact, letting PHP show me these messages helped me a lot to find some bugs. Too bad I wasn't aware of this before.
I uploaded a new ZIP (link is the same as before, see the first post).
  • All PHP-Notices should now be gone. Getting rid of the notices really helped me to discover plenty of bugs ... (shame on me :schwitz
  • I optimized the MySQL table, they will now be created with appropriate indexes. Thus, you should now manually drop existing tables in order to have them created automatically again (with the index). Sorry for the inconvinience ... I could have written an update/altering script, but I was too lazy.
  • Fixed a bug in the trackerupdate.php. If any parameter is specified in the call that is not known, no update will be performed.
If I have overseen any "Notices", please post this here. (Thanks at Okram for his help again, you are know mentioned in the acknowledgements).

I also would like to know if the tracker now runs under PHP4. If not, this will be the next topic I'll take care of.

Thanks@all.

Timo
Creating 'super' password or click link Login and after Log on button or what ever link in menu i click this notices i see everytime.


Notice: Undefined variable: TrackerSDKpremium in /home/username/public_html/lfs/hottracker/sdk/hottrackerui.php on line 35

Notice: Undefined index: 2009/03 in /home/username/public_html/lfs/hottracker/sdk/model/statistics.php on line 61

When i click to register user i see:

[B]Notice[/B]: Undefined index: url in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]61[/B]

[B]Notice[/B]: Undefined index: username in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]63[/B]

[B]Notice[/B]: Undefined index: firstname in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]64[/B]

[B]Notice[/B]: Undefined index: lastname in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]65[/B]

[B]Notice[/B]: Undefined index: racername in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]66[/B]

[B]Notice[/B]: Undefined index: email in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]67[/B]

[B]Notice[/B]: Undefined index: pwd in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]68[/B]

[B]Notice[/B]: Undefined index: pwdcheck in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]69[/B]

[B]Notice[/B]: Undefined index: code in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]70[/B]
[B]Notice[/B]: Undefined variable: valid_racername in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]308[/B]

I register new user but don't fill all fields and see this:
[B]Notice[/B]: Undefined index: url in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]61[/B]

[B]Notice[/B]: Undefined offset: 0 in [B]/home/username/public_html/lfs/hottracker/sdk/model/hottrackerdb.php[/B] on line [B]546[/B]

User created and e-mail sended, but e-mail is empty. Subject was: Welcome to HoT Tracker v2.0

Maybe this help
Dear Okram, you clearly have some talent for beta-testing.

Uploaded fixed ZIP ... I think we're getting close to get rid of the beta-tag.

If any more notice occur that I have overseen, please post them.

Kind regards and many thanks!

EDIT: One more thing: I wasn't able to reproduce the empty email. The eMails is sent in HTML and plain text, so you should get something anyway. If you can still reproduce it, please tell me how.
After 'super' eMail and password:
[B]Notice[/B]: Undefined index: 2009/03 in [B]/home/username/public_html/lfs/hottracker/sdk/model/statistics.php[/B] on line [B]62[/B]

After register new user
[B]Notice[/B]: Undefined index: url in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]63[/B]

Something wrong with @yahoo.com. Yahoo email is empty. I test @hot.ee, @gmail.com and my work email - works!

Link: Display Server Status
Here is text Private and No
I'am not sure this is right. Both my server must be private (yes), but this say no. Flags: P is right.

Okram Server private yes (server S2)
Okram Race Server private yes (server S2)
[url="lfs://|lfs://|%5Es%5Es%5EsM+Team+Server|0|S2|0|S2"]///M Team Server[/url] private no (not my server and this Demo)

Here is Host name with lfs:// link. I not use this link but this wrong!
Example you: lfs://|lfs://|%5Es%5Es%5EsM+Team+Server|0|S2|0|S2
Example [url="http://www.lfsword.net"]www.lfsword.net[/url]: lfs://|%5Es%5Es%5EsM+Team+Server|0|S2/

Link: Tracker Demo Page
[B]Notice[/B]: Undefined variable: base_dir in [B]/home/username/public_html/lfs/hottracker/templates/trackertest.php[/B] on line [B]58[/B]

Indeed, a bug with the private field (and also the MUSTPIT field). Both now fixed. The join2lfs link is also fixed now. The notices should now also be gone. New ZIP uploaded.

Don't know what to do about the yahoo.com issue ... I just wrote a note in the register.php script.

Great work, mate! Really!
After register new user i fill all field:
[B]Notice[/B]: Undefined index: racername in [B]/home/username/public_html/lfs/hottracker/sdk/model/register.php[/B] on line [B]231[/B]

User or administrator click Tracker Demo Page
[B]Notice[/B]: Undefined index: HoT_Tracker_Demo_Track in [B]/home/username/public_html/lfs/hottracker/templates/trackertest.php[/B] on line [B]32[/B]

[B]Notice[/B]: Undefined index: HoT_Tracker_Demo_Cars in [B]/home/username/public_html/lfs/hottracker/templates/trackertest.php[/B] on line [B]33[/B]

This two notices was 1. time.
Nice. Fixed it.

Also added a new feature for the ingame racer list maintenance: Delete all racers of a given team (it can be annoying when one has to delete mutliple racers one-by-one ... maybe this helps, maybe I will add some checkboxes in the future).

Thx!

PHP4/5, MySQL - HoT Tracker - PB/HL tracker, online racers, host status and more ...
(64 posts, started )
FGED GREDG RDFGDR GSFDG