Jump to content

mtasg on Apache


Guest zulu

Recommended Posts

Hi Im new to PHP and I´ve been reading all the posts in this forum, But they did´ent help at all :(.

I´ve got Windows XP so I installed: Apache v1.3.28

I also installed a PHP program called "EasyWindows PHP" URL: http://php.weblogs.com/easywindows

Reading thrue the threads I ran in to this option: "C:\Program Files\php\cli\php.exe" "C:\Program Files\MTA\mtasg.php" but that did´ent work. Then somewere else I red that with the new "update" script you could run mtasg with Apache alone. But It did´ent explane how.

Now, I dont wont to be a pain :). But if any one have the time, could you PLEASE make a "how to" guide. Or release a modyfied "httpd.conf" and were to place the different files.

Other then this, littel overlooked add-on, MTA:VC is a GREAT mod.

Thanks and keep up the good work.

Link to comment

Ok, now I think I got some of it. I finely downloaded the right PHP program, when I open the PHP folder there is a file called php.exe, also there is a folder called cli and in that folder there is also a file called php.exe.

Useing the php.exe from the cli folder I executed this command:

C:\php\cli\php.exe "C:\mtasg-0.3\mtasg.php"

And it runs it ok. But the MS-Dos window closes right away.

PLEASE someone HELP.

And a nother thing, how do you view a .php file thats not on a server (fx. C:\mtasg-0.3\index.php)

Link to comment

Stupid stupid me. To view index.php I just use "Internet Explorer" ghess I´m a littel slipy :).

Well when I run the command: "C:\Program Files\php\cli\php.exe" "C:\Program Files\MTA\mtasg.php" this is what I´m left with:

C:\Documents and Settings\Menace>MTASG 0.3 - Multi Theft Auto Statistics Generat

or by Wartech

Parsing logfile: C:\php\cli\mtaserver.log

Warning: array_keys(): The first argument should be an array in C:\php\cl

i\mtasg.php on line 228

Warning: Invalid argument supplied for foreach() in C:\php\cli\mtasg.php

on line 228

Warning: array_keys(): The first argument should be an array in C:\php\cl

i\mtasg.php on line 239

Warning: Invalid argument supplied for foreach() in C:\php\cli\mtasg.php

on line 239

Warning: arsort() expects parameter 1 to be array, null given in C:\php\c

li\mtasg.php on line 257

Warning: key(): Passed variable is not an array or object in C:\php\cli\m

tasg.php on line 259

Done! 1 lines parsed in 0 seconds

Saving statsfile: C:\php\cli\public_html/stats/index.php

I red in another thread that theis Warnings dont matter. Ok I get that, but it says. "Done! 1 lines parsed in 0 seconds" and thats it. Nothing else happens. Way oh way dosent it keep running over and over??

Please help.

Link to comment

Now it is begenning to make more sens to me.

The first time i ran the program it could´nt find "mtaserver.log" so I just created one. And that was a mistake ofcouse.

I changed the path to were the MTA server makes this file:

C:\games\Grand Theft Auto Vice City\MTA\mtaserver.log.

And that did a world of diffenrens.

But is there a way to make the script (C:\Program Files\php\cli\php.exe" "C:\Program Files\MTA\mtasg.php) run lets say every 10min. And automaticly upload the "Index.php" to the website lets say every 2 hours?

Link to comment

Ok, now I undestand it all, and I did it all on my own :).

But there is one thing I´d like to know. In the "config.php" file theres this line: "// Path to directory to store the statspages in".

I tryed to make it save it direcly to the web site like this:

ftp://username:password@ftp.domin.com

And it gives me this error:

Warning: fopen(ftp://username:password@ftp.domin.com/players/0.php): failed to open stream: FTP

server reports 213 2472

in C:\php\cli\mtasg.php on line 717

Failed opening playerfile: ftp://username:password@ftp.domin.com/players/0.php

for writing

pages in

But if I type in the URL in the browser it connects no problem. Can any body shine some light on this problem?

Link to comment
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...