View Full Version : PHP4/5, MySQL - HoT Tracker - PB/HL tracker, online racers, host status and more ...
HorsePower
22nd March 2009, 11:21
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 (http://www.g-g-c.de) 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 (http://www.g-g-c.de/forum/forumdisplay.php?f=796) 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.
Silox
22nd March 2009, 14:53
I can't wait for it :)
Keep up the good work!
Dygear
22nd March 2009, 18:38
Scweet!
HorsePower
22nd March 2009, 21:42
It's done ... for now. :D Have fun and be gentle :nod:
HorsePower
23rd March 2009, 15:09
I just saw that there is a default server configuration missing in the the ZIP. I will add this tonight.
FM-Failure
23rd March 2009, 16:57
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.
HorsePower
23rd March 2009, 17:45
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. :)
FM-Failure
23rd March 2009, 18:37
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.
HorsePower
23rd March 2009, 18:40
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 ...
filur
23rd March 2009, 19:31
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
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".
HorsePower
23rd March 2009, 20:19
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.
Okram
23rd March 2009, 22:24
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 (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.
HorsePower
24th March 2009, 08:18
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.
Dygear
24th March 2009, 08:54
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 (http://php.net/extract) that data from the $_SERVER array and push into the scope of the document that way.
Okram
24th March 2009, 10:48
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
<form method="post" action="<?php echo($PHP_SELF); if ($go_back) echo('?back'); ?>">
works
<form method="post" action="<?php 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
HorsePower
24th March 2009, 11:14
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 ... :thumb:
HorsePower
24th March 2009, 18:36
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).
HorsePower
25th March 2009, 07:46
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. :scratchch
HorsePower
26th March 2009, 22:20
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
Okram
28th March 2009, 13:12
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:
Notice: Undefined index: url in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 61
Notice: Undefined index: username in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 63
Notice: Undefined index: firstname in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 64
Notice: Undefined index: lastname in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 65
Notice: Undefined index: racername in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 66
Notice: Undefined index: email in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 67
Notice: Undefined index: pwd in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 68
Notice: Undefined index: pwdcheck in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 69
Notice: Undefined index: code in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 70
Notice: Undefined variable: valid_racername in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 308
I register new user but don't fill all fields and see this:
Notice: Undefined index: url in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 61
Notice: Undefined offset: 0 in /home/username/public_html/lfs/hottracker/sdk/model/hottrackerdb.php on line 546
User created and e-mail sended, but e-mail is empty. Subject was: Welcome to HoT Tracker v2.0
Maybe this help :scratchch
HorsePower
28th March 2009, 13:50
Dear Okram, you clearly have some talent for beta-testing. :thumb:
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.
Okram
28th March 2009, 18:32
After 'super' eMail and password:
Notice: Undefined index: 2009/03 in /home/username/public_html/lfs/hottracker/sdk/model/statistics.php on line 62
After register new user
Notice: Undefined index: url in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 63
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)
///M Team Server (lfs://|lfs://|%5Es%5Es%5EsM+Team+Server|0|S2|0|S2) 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 www.lfsword.net (http://www.lfsword.net): lfs://|%5Es%5Es%5EsM+Team+Server|0|S2/
Link: Tracker Demo Page
Notice: Undefined variable: base_dir in /home/username/public_html/lfs/hottracker/templates/trackertest.php on line 58
;)
HorsePower
28th March 2009, 19:01
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! :thumb:
Okram
28th March 2009, 20:26
After register new user i fill all field:
Notice: Undefined index: racername in /home/username/public_html/lfs/hottracker/sdk/model/register.php on line 231
User or administrator click Tracker Demo Page
Notice: Undefined index: HoT_Tracker_Demo_Track in /home/username/public_html/lfs/hottracker/templates/trackertest.php on line 32
Notice: Undefined index: HoT_Tracker_Demo_Cars in /home/username/public_html/lfs/hottracker/templates/trackertest.php on line 33
This two notices was 1. time.
HorsePower
28th March 2009, 20:44
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!
Okram
28th March 2009, 22:52
hm... link Table Styles
Notice: Undefined variable: styledef in /home/marko/public_html/lfs/hottracker/sdk/model/styles.php on line 88
Below get notices if i use or do something
Link Show all LFS World Teams. If I press button Reload all works but if i checked Show team members (slow performance) then lots of some notices:
Notice: Undefined index: Members in /home/username/public_html/lfs/hottracker/sdk/model/lfswteams.php on line 50
Link Groups
Add new group
Notice: Undefined offset: 0 in /home/username/public_html/lfs/hottracker/sdk/model/hottrackerdb.php on line 750
Maybe this wa last notice but i'am not sure ;) Now i test little more.
One security mistake. What happend if user lost password?
Now: Administrator reset password and tell him because only hi see this password. No e-mail now.
Future: Administrator reset password and automatically send e-mail to user. Administrator don't see this password. OR, link Forgot Password for user. My opinion.
First must remove old Notices :nod:
Dygear
29th March 2009, 09:09
Okram - Damn, good beta testers are hard to come by, nice job!
HP - Great work keeping on top of this.
HorsePower
29th March 2009, 14:33
Ok, the notices are hopefully gone now (but I believe there are still some more hidden in the code ... just waiting for Okrom to reveal them :D).
Concerning the password reset, Okram, you're absolutely right. I also wasn't satisfied with the current solution, but regarded it as not important enough to change it.
Now, any user can reset his password by himself. Since there is no identification check, the user has to provide the email address in order to reset the password. If he doesn't know his email anymore, he can't do anything. When resetting the password, an email will be sent.
I still allow the super user to reset the password for a user (automatic email generation still to implement at this point).
In order for the email to be a valid identifier (just as the username) it has now to be unique in the tracker user database!
Other than that:
A slight change of the control center layout (two columns of menu items now)
Super user now can leave a note in the control center (either visible to all visitors, to registered users only or to no one at all).
I still have to update the documentation as well ...
Regards,
Timo
HorsePower
29th March 2009, 15:13
Ok, uploaded an updated documentation and ZIP.
And if the super user now decides to reset the password of a registered user, he will not see the password anymore - instead an automatically created email will be genereted and sent to the user.
I think that's it for today. I hope there will not be so much issues anymore because I'm kind of burned-out at the moment. I need a break. :schwitz:
However, if there are still some smaller issues, I will fix them and remove the BETA tag a few days from now.
Okram
29th March 2009, 17:36
Two image link is broken Hot Tracker v2.0 beta and German Gamers Club
http://http//mydomain/~username/lfs/hottracker/images/logo.png
http://http//mydomain/~username/lfs/hottracker/images/ggc.png
Logout, Login and Register link is broken right corner of top and eMail send wrong link if you have forgotten your password
http://http//mydomain/~username/lfs/hottracker/sdk/model/logout.php
http://http//mydomain/~username/lfs/hottracker/controlcenter.php?loginform
http://http//mydomain/~username/lfs/hottracker/sdk/model/register.php
Click Groups, add new group and notice
Notice: Undefined offset: 0 in /home/username/public_html/lfs/hottracker/sdk/model/hottrackerdb.php on line 775
:)
Okram
29th March 2009, 17:50
This not bug but i see this ;) Ingame Racer Names and Racers per Group. If users added then Preview (Racer field in Racers per Group) works fine if user is team member. But if not, then before name is space. Move mouse over name in table.
Okram
TEST Okram
HorsePower
29th March 2009, 18:20
The broken links are all based on the constant LINKBASE in config.php, i.e. they are for example
$link = LINKBASE . "/sdk/model/register.php
So if they are broken, you have most likely set up you LINKBASE constant wrong. I suppose in your case you need to set
@define(LINKBASE, "http://mydomain/~username/lfs/hottracker");
in config.php (do not forget the ":" between http and //).
Concerning the space in the Ingame Racer Names: When you add a new racer, the tracker suggests a pattern for an ingame name. By default, this suggestion is
^t ^n
where ^t is replaced by a team tag and ^n by the LFS Nickname and is the HTML command for a non-breaking space.
So if you add a racer which has no team, you should really change this pattern to
^n
or any explicit name (including LFS color codes).
The notice will have to be fixed of course. EDIT: <== Fixed.
Okram
29th March 2009, 21:57
Ups, my mistake. Fast copy & paste ;) It seems that now, I guess all of the notices found. No more notices :)
HorsePower
30th March 2009, 12:09
Yeah! :headbang:
(There are still some, I'm sure, they just have to be found ...)
I hope you can enjoy the tracker now. :)
HorsePower
9th April 2009, 09:18
Since there hasn't been any feedback since a while now, I assume there are no critical bugs anymore. I hope the tracker now works also with PHP4, but I'm not sure about that.
Anyway, I uploaded the latest version and removed the BETA tag.
I wish you all a happy easter. :)
Neto_r
9th June 2009, 19:57
hi i´m having problems with the tracker
i install it all the stuff
http://www.lfscr.com/hottracker/controlcenter.php
but when i loggin as a "super" appears all in white
and when i log out, dont work, and still login
andy idea...?
HorsePower
9th June 2009, 21:35
Well, at least you are able to login as "super". So the MySQL setup seems to be fine.
When I try this link:
http://www.lfscr.com/hottracker/controlcenter.php?loginform
I can see the grey background. The same holds for the registration page.
I have no idea yet what it could be.
Please check
data directory allows write access (chmod 777)
Maybe delete your cookies and re-login.
Neto_r
9th June 2009, 22:01
i delete cache/cookies in Firefox
and the DATA is with CHMOD: 777
the files in the /data/ are in: 755 CHMOD
andy idea?
Neto_r
9th June 2009, 22:09
1) the grey:
2) the login with: "super" and appears in white all
3) when i try to logout, dont work, and still in LOGIN
4) when i click in: CLICK HERE for redirect, appears in the same whit page and said: (super:logout), like 2)
HorsePower
10th June 2009, 08:46
Problem seems to be solved now. It seems the tracker still does not work properly with PHP4, switching to PHP5 solved the issue.
Looking at your installation there are still some broken links to images.
This is due to an incorrect setup of config.php. There is a parameter where you have to enter the base-URL for your tracker installation. In your case that is something like http://www.lfscr.com/hottracker (maybe you have to add a '/' at the end also, take a look in the documentation please).
HorsePower
14th June 2009, 12:13
Bone from Bavarian Racing discovered a bug related to character encoding.
When creating a new racer with a name containing UTF-8 2-Byte characters (like "ü" for example), the name on the DB was written in non-UTF-8 format (i.e. "ü" as 2-Characters, not one 2-Byte character).
The same problem occured when creating ingame tags or names containing such special characters (like ä, ö, ü, or Alt-0149: •).
The reason was a missing explicit MySQL statement that all data transfer between PHP and MySQL should be done in UTF-8.
This is now fixed, new version uploaded, see first post.
Thanks to Bone!
jscorrea
15th July 2009, 04:04
Horse, congrats for Hottracker.
When i update selected racers results in no data found on PBs, WR...
The only configuration needed is in the config.php file?
Where I come to adjust data only for my servers?
Every change of page slow 5 seconds...ex: LFS Color Replacement Configuration
Regards.
HorsePower
15th July 2009, 19:05
Thank you.
Let me try to figure out your questions ...
Basically, you only need to adjust the config.php (it is well-documented, also in the PDF-document).
Make sure you use PHP 5.x as there are still some issues with PHP 4.x.
Make sure, the data directory allows writing access (chmod 777).
I'm not exactly sure what you mean with the other questions. When the single racer update sais "no data" this might be due to "no data" being found on LFS World (e.g. the racer does not exist or he has no HLs on LFSW for example).
Other than that don't forget that there is a tar-pitting for LFS World Access. That means, if you do not have PREMIUM-Access, you will only be allowed to read data from LFS World only every 5 seconds.
That changing the page is so slow might be due to a slow server or a misconfigured config.php. What are your settings?
jscorrea
15th July 2009, 19:24
Thanks!
Config.php is ok.
PHP Version 5.2.9
Take a look:
http://www.lfsbr.com/hottracker
user: super
pass: 123456
Regards!
HorsePower
16th July 2009, 18:49
You might have some server setup issues. When trying to load the tracker test page, I get some warnings:
Warning: file_get_contents() [function.file-get-contents (http://www.lfsbr.com/hottracker/templates/function.file-get-contents)]: URL file-access is disabled in the server configuration in /home/lfsbr/public_html/hottracker/templates/trackertest.php on line 96
Warning: file_get_contents(http://www.lfsbr.com/hottracker/controlpanel.php?group=ALL&config=default&style=default&colors=default&cars=XFG&track=&multiple=1) [function.file-get-contents (http://www.lfsbr.com/hottracker/templates/function.file-get-contents)]: failed to open stream: no suitable wrapper could be found in /home/lfsbr/public_html/hottracker/templates/trackertest.php on line 96
Other than that I think it's the connection to the MySQL DB that takes so long. The only page that loads faster is the Tracker Test page (which does NOT check the user currently, thus has no access to the DB unless you explicitely request the tracker list).
Check your server settings please.
Dygear
17th July 2009, 08:10
It is indeed the file_get_contents() function call that is causing the issue. His current server configuration does not allow the use of file_get_contents() access urls. There is a setting within the main php.ini file that prosides over the whole webserver that allows for the use of the file functions URLs. The setting is called allow_url_fopen (http://us3.php.net/manual/en/filesystem.configuration.php#ini.allow-url-fopen) and it must be set to TRUE. It should be noted that this setting can only be changed in the main php.ini file, and any local changes to this setting will be ignored. It should also be noted that the first warning caused the second warning, and once you fix the first warning the second warning will go away.
jscorrea
17th July 2009, 13:41
Look here Dygear:
http://lfsbr.com/phpinfo.php
Thanks!
Dygear
18th July 2009, 07:18
Look here Dygear:
http://lfsbr.com/phpinfo.php
Thanks!
Ok, I submit one other item of fact but as I'm quite unsure how a compile time option would effect the reporting of the php.ini file I don't have any evidence to support this theory. (just instinct)
There is a compile time option --allow-URL-wrappers or something like that, that if set to false will turn the value off irrespective of the setting in the php.ini file. I'm not sure if you have This compile time option set if it would still report as true when set as such in the php.ini file even tho the value is compiled to off and thus is unaffected by php.ini.
So even tho it's showing as on, it might be compiled to off (as the code path is not there anymore) and thus can't be turned on. You can't turn on what's not there.
HorsePower
18th July 2009, 08:35
So maybe I should implement this ...
Anyway, the file_get_contents is just in the demo page. One can also use include instead I think.
Maybe I will need your help, Dygear, since some users get the error message (header already sent ...) when I try to set COOKIEs. The strange thing is, that I cannot reproduce it. I have two different trackers on two different servers and I never had that problem.
But others have ... I cannot figure it out. :shrug:
Dygear
18th July 2009, 11:16
Headers are sent before any output, including error messages. For an error message to be displayed in a browser the php script must first send the header of the page to conform to the HTTP standard. By default, error messages do not wait for the end of code execution and thus any output will be flushed to the screen and as such any headers that have been set are sent to the browser. For this reason, if your page throws an error before you call your last header() function in your program, the warning will show that the headers have already been sent. A solution to this problem is to suppress errors, but log them to a file, for this I recommend you implement the php native function set_error_handler (http://php.net/set_error_handler)().
COOKIEs are nothing more the a string in a header, thus if you have already sent the output to the browser, you can no longer set a cookie. It should also be noted that the ob_start (http://php.net/ob_start)() and ob_get (http://php.net/ob_get_flush)/end (http://php.net/ob_end_flush)_flush() should correct this issue if your having issues with headers being sent before they should. (Because, don't forget, a cookie is nothing more then a special header statement.)
Dygear
1st August 2009, 05:05
Have you had any luck?
HorsePower
6th August 2009, 08:58
I already used the ob_start etc. stuff in order to prevent the messages and this works (except for the pages were I forgot to use it).
But I think it's not the optimal solution. It's like a doctor giving you pills against the pain without checking the reason for it. :)
The main issue here is, that I never have had these problems with my two installations. So something must be different for the users which have this problem. I though a lot about it but I have no idea ...
Dygear
7th August 2009, 06:11
I already used the ob_start etc. stuff in order to prevent the messages and this works (except for the pages were I forgot to use it).
But I think it's not the optimal solution. It's like a doctor giving you pills against the pain without checking the reason for it. :)
The main issue here is, that I never have had these problems with my two installations. So something must be different for the users which have this problem. I though a lot about it but I have no idea ...
Oh, I love doctor metaphors!
The reason I proscribed the ob_start (http://php.net/ob_start)() and ob_end_flush (http://php.net/ob_end_flush)() was due to the signs and symptoms of the error message. Not only is a prophylactic solution to the problem in the future, but also the cure.
The etiology of the problem is that you simply can't send headers out during the body of the html. You've lost your chance! As to why the occurs on their system, and not yours could be due to many things! Packet max transmission unit, output_buffering option set in your php.ini file and not theirs. Your other option is to use the headers_sent (http://php.net/headers_sent)([string &$file[, int &$line]]) function and if it returns true, then don't use the header function from that point on. I would also highly recommend the use of the $file and $line variables as that will give you the filename ($file) and the line ($line) that the output started on, from there you might be able to make some changes to prevent this from happening, or just move your logic up so it happens before this line on this file.
HorsePower
7th August 2009, 08:55
You are my master, Lord Dygear! I will try it out the next days. :thumb:
Dygear
8th August 2009, 05:30
You are my master, Lord Dygear! I will try it out the next days. :thumb:
Lol, *takes a bow* Thank you, thank you, I'm here till Thursday.
Let me know how that works out for you.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.