Jump to content

Haiku

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Haiku's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am running Apache/PHP/MySQL on a Win2K3 web server edition box. I have a particular problem where I need to use aliasing with apache to read data outside a webroot, but I’ve not been able to get this to work successfully. In a nutshell, I have this one server which serves a variety of webpages so I’m doing virtual hosting. I also use this box to host multiplayer car simulation races. I have this PHP/MySQL blog that can read results files that are generated by the car sim games and show how a race is progressing live to someone over the web. For me to do this, within the blog I have to specify a directory where these results text files are, and this directory has to be underneath where the blog itself is installed. For example, this is where the blog is installed: C:\Program Files\Apache Group\Apache2\htdocs\carracing\webroot\sls And the directory where the blog expects to find results files is: C:\...\sls\files\gtr2live Within the blog’s control panel I specify the results directory this way: files/race07live However, the game doesn’t write results files there, the game writes them here: C:/Documents and Settings/caradmin/My Documents/GTR2/UserData/LOG_Dedicated/Results These are snippets from my virtual host setup: <VirtualHost *:80> ServerAdmin webmaster@carleague.org DocumentRoot "C:\Program Files\Apache Group\Apache2\htdocs\carracing\webroot" ServerName racing.carleague.org Alias /sls/files/gtr2live/ "C:/Documents and Settings/caradmin/My Documents/GTR2/UserData/LOG_Dedicated/Results/" <Directory "C:/Documents and Settings/caradmin/My Documents/GTR2/UserData/LOG_Dedicated/Results/"> Options Indexes AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> But this isn’t working. I don’t get an error from apache, but the blog’s real time viewer tells me no data is present (the files/race07live directory is empty right now), so this tells me it’s not redirecting to the other directory where there are hundreds of results files. I’ve tried several variations on the “Alias” directive and have tried the “Location” directive but nadda. At one point I think I got something working because I started to get 403 access forbidden errors where the results files are actually stored, but I could not resolve those errors after changing folder permissions a bunch of times. Still I want to know if this is the right way to do this.
  2. well that looks like it works. Thank you :)
  3. I play an online car sim, GTR, and after a race it creates a log file that I want to parse and write to a database. I've not any experience with parsing logs - I'm not asking how to write the actual script but I need suggestions on how to approach this problem. Here is a portion of the log: //[[gMa1.000f©2004 SBDT]] [[]] [Header] Game=GTR Version=1.400 TimeString=2006/03/16 21:52:24 Aids=0,0,0,0,0,1,0,0,0 [Race] RaceMode=5 Scene=GAMEDATA\LOCATIONS\Barcelona\Barcelona.TRK AIDB=GAMEDATA\LOCATIONS\Barcelona\Barcelona.AIW Race Length=0.200 Track Length=4718.9307 [Slot007] Driver=C_Bex Vehicle=Saleen Teams - S7-R Team=Konrad Motorsport Penalty=0 QualTime=1:50.335 Laps=6 Lap=(0, -1.000, 3:03.475) Lap=(1, 223.820, 2:08.530) Lap=(2, 352.349, 2:00.438) Lap=(3, 472.787, 1:50.591) Lap=(4, 583.378, 2:08.462) Lap=(5, 711.840, 2:23.195) LapDistanceTravelled=1667.881348 BestLap=1:50.591 RaceTime=DNF Reason=0 [Slot000] Driver=BH Vehicle=Ferrari Teams - 360 Modena Team=Menx Penalty=0 QualTime=1:48.111 Laps=19 Lap=(0, -1.000, 3:01.972) Lap=(1, 222.317, 1:55.995) Lap=(2, 338.312, 1:50.358) Lap=(3, 448.671, 1:53.831) Lap=(4, 562.502, 1:50.526) Lap=(5, 673.028, 1:51.130) Lap=(6, 784.158, 1:49.784) Lap=(7, 893.941, 1:53.135) Lap=(8, 1007.077, 1:51.039) Lap=(9, 1118.116, 1:50.883) Lap=(10, 1228.999, 1:50.778) Lap=(11, 1339.777, 1:50.370) Lap=(12, 1450.147, 1:51.789) Lap=(13, 1561.937, 2:06.571) Lap=(14, 1688.507, 2:09.218) Lap=(15, 1817.725, 2:09.650) Lap=(16, 1947.375, 3:25.906) Lap=(17, 2153.281, 2:15.009) Lap=(18, 2288.290, 2:04.894) LapDistanceTravelled=4599.286621 BestLap=1:49.784 RaceTime=0:39:32.839 [Slot001] Driver=whitham69 Vehicle=Chrysler Teams - Viper GTS-R Team=Zwaan's Racing Penalty=0 QualTime=1:41.356 Laps=12 Lap=(0, -1.000, 3:00.675) Lap=(1, 221.020, 1:49.506) Lap=(2, 330.526, 1:43.544) Lap=(3, 434.070, 1:42.503) Lap=(4, 536.573, 1:42.339) Lap=(5, 638.912, 1:43.145) Lap=(6, 742.056, 1:43.078) Lap=(7, 845.134, 1:43.336) Lap=(8, 948.470, 1:42.415) Lap=(9, 1050.885, 1:42.994) Lap=(10, 1153.879, 1:42.991) Lap=(11, 1256.870, 1:42.179) LapDistanceTravelled=3412.975586 BestLap=1:42.179 RaceTime=DNF Reason=4 [Slot002] Driver=TPG`Haiku Vehicle=Porsche Teams - 911 GT3-RS Team=Freisinger Motorsport Penalty=0 QualTime=1:51.295 Laps=19 Lap=(0, -1.000, 3:04.045) Lap=(1, 224.390, 1:58.526) Lap=(2, 342.915, 1:51.348) Lap=(3, 454.263, 1:51.826) Lap=(4, 566.089, 1:52.024) Lap=(5, 678.113, 1:54.562) Lap=(6, 792.675, 2:05.667) Lap=(7, 918.342, 1:52.338) Lap=(8, 1030.681, 1:54.997) Lap=(9, 1145.678, 1:55.559) Lap=(10, 1261.237, 1:54.174) Lap=(11, 1375.411, 1:58.668) Lap=(12, 1494.079, 1:54.652) Lap=(13, 1608.731, 2:05.343) Lap=(14, 1734.074, 1:54.827) Lap=(15, 1848.902, 1:55.140) Lap=(16, 1964.042, 2:11.171) Lap=(17, 2095.212, 1:53.895) Lap=(18, 2209.107, 1:54.338) LapDistanceTravelled=4631.258301 BestLap=1:51.348 RaceTime=0:38:03.101 [END] I want to write information on each driver (name, car, total laps, best time, race time) each to a row in the database. I don't need to write the information on the specific laps. What is a good way to approach this problem?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.