Linux logging Problem

Discussion in 'BF2Statistics discussion' started by lord0815, Feb 20, 2006.

  1. lord0815

    lord0815 New Member

    I describe it in some words...
    Linux Server / Apache / MySQL / BF2_12

    Everything runs fine - if i open the ASP/bf2statistics.php in a browser an empty .txt file will be created...
    If the server runs and a round ends nothin happens...

    Some Apache logfiles give me the following message:

    127.0.0.1 - - [20/Feb/2006:18:55:06 +0100] "POST /home/htdocs/web12/html/ASP/bf2statistics.php HTTP/1.1" 404 1041 "-" "GameSpyHTTP/1.0"


    Any hints what is wrong? As i use for test reasons the root account it couldnt be a permission problem.

    Thanks

    bye
     
  2. csuno

    csuno New Member

    seems, nothing is wrong. Your bf2statistics.php dont give any output, on a browser! Just watch, in game (BFHQ) or directly in your mySQL DB or with the BF2 Webinterface, or the BF2Signature...

    ...CSUNO

    ...EDIT...sorry my fault, its "POST"
     
  3. lord0815

    lord0815 New Member

    Its a POST request...

    The DB is empty.
     
  4. MrNiceGuy

    MrNiceGuy Founder Staff Member

    Are the IP in snapshot.py right?
     
  5. lord0815

    lord0815 New Member

    umm okay... its the localhost ip... maybe its my fault... but its the same server... but. - with the hosts entry its maybe the solution to give the snapshot.py the official ip. thanks i will reply at success. :)
     
  6. lord0815

    lord0815 New Member

    No success so far :/

    But if someone played on the server he can get his stats at cdb.bf2-warzone.com ?!
    Also if he inserts the Database IP from my server.
     
  7. MrNiceGuy

    MrNiceGuy Founder Staff Member

    You can, if you have problems, also point your hosts file to CDB.

    The stats should update first to your database, then it attempts to post to the bf2warzone one.

    Can you paste the settings you have in snapshot.py and ASP/config.php (remove your password)
     
  8. lord0815

    lord0815 New Member

    HEy!

    I do nearly anything for a running stats system integrated in my own database 8)

    Here it comes:

    Code:
    #################################################
    #
    # History:
    #   11/24/05 v0.0.1 - ALPHA build
    #   11/28/05 v0.0.2 - Removed killedByPlayer
    #                   - Added kills
    #   12/08/05 v0.0.3 - Added deaths
    #   12/09/05 v0.0.4 - Removed tnv/tgm
    #   12/10/05 v0.0.5 - Added prefix
    #   12/14/05 v0.0.6 - Removed useless GS call
    #                   - Removed tactical/zip/grappling kills
    #                   - Added grappling deaths
    #   12/25/05 v0.0.7 - Added v
    #   01/03/06 v0.1 - BETA release
    #   01/05/06 v0.1.1 - Added master db
    #                   - Added socket timeout/error handling
    #   01/25/06 v0.1.2 - Updated CDB IP
    #   02/15/06 v0.1.3 - Updated CDB URL
    #
    #################################################
    
    HOST = '217.160.xx.50'				# server ip
    PORT = 80						# server http port
    PATH = '/home/htdocs/web12/html/ASP/bf2statistics.php'	# server path to script
    PREFIX = ''						# log file prefix
    
    #################################################
    #     DO NOT EDIT ANYTHING BELOW THIS LINE!
    #################################################
    
    and the config.php

    Code:
    
    

    If you need some information i had disguised i´ll tell you, but posting in the form isnt a good idea :)

    Maybe you have a dump with dummy inserts for the DB to test it against the config.php with playerstats?

    Thanks for help!
     
  9. MrNiceGuy

    MrNiceGuy Founder Staff Member

    I see 1 problem, and that is your path...

    Change from : PATH = '/home/htdocs/web12/html/ASP/bf2statistics.php' # server path to script

    To:

    PATH = '/ASP/bf2statistics.php' # server path to script

    That will make both HOST and PATH to: 217.160.xx.50/ASP/bf2statistics.php
    wich would be the right url.

    Try this and let me know how it works. ;)
     
  10. lord0815

    lord0815 New Member

    One thing i have to ask...
    I´m running more than one virtual host on this machine...

    Domain1
    Domain2
    Domain3
    ...
    Each Domain will be found behind the ip address... So an request to http :// 217.160.xx.50/ASP/bf2statistics.php will get an 404 file not found error.

    Is it possible to use domain names instead of ip address??
    Iam really the only one hosting some sites with the bf2 server? :(

    I thought of making an rewrite but to get it work it will affect any virtual host and if i ever have an folder called ASP it will be rewritten... ummm

    Does the server make only http request to this path?? So i think it has to work with domain names...

    But thanks for advice.
     
  11. MrNiceGuy

    MrNiceGuy Founder Staff Member

    I guess it would work to post to a url, but the problem is in the hosts file on the game server, you will need to point that to the web server with the ASP folder e.g 127.0.0.1 bf2web.gamespy.com

    That will only work with ip --> url

    This is important to get the ingame promotion, ranks and unlocks to work.
     
  12. lord0815

    lord0815 New Member

    That sounds strange :/

    Which script points to bf2web.gamespy.com?
    Is this a request example:

    bf2.gamespy.com/ASP/xxxxx.aspx ?

    !devilmad i think i´ve a solution... i will give the virtual host also the domin bf2.gamespy.com ... that will bring success :)
    Now i only need two players on the server... iam @work and cant play :)
     
  13. lord0815

    lord0815 New Member

    SUCCESS!!!!
     
  14. MrNiceGuy

    MrNiceGuy Founder Staff Member

    Gr8! Congratz :)
     
  15. lord0815

    lord0815 New Member

    Thanks!

    I created a small tutorial for Linux Server Installation - but forgot it @ work !peeved
    Tomorrow i will publish a link or the tutorial at bf2statistics.com

    @MNG maybe you wanna check it before i release it :)

    In this case PM me.

    Now i will test my server :)

    Is it possible to turn of the ranking at cdb.bf2-warzone.com ?
    Theres now a lot of 'shit' in their databse because of testing last days :/
     
  16. MrNiceGuy

    MrNiceGuy Founder Staff Member

    All tutorials are welcome! :D

    As long as they tell correct what to do, and are not confusing... Like ours! lol

    And yes, it is possible to turn off the CDB, just comment out the part in snapshot.py. :)
     

Share This Page