**UPDATE** ON . .::STATS::..

5 replies [Last post]
Stranger

Aight .... hello again I know the stats have seemed to dissappear but soon hopefully tomorrow they will be back. I have a new system Tongue and they will be updated daily, maybe a few times daily. As of now I am doing just the [MR] Freeze Server because I have to test some resource and bandwidth issues. Anyways thought I would let everyone know just in case they wanted to track stats.

P.S. **If anyone understands PHP (uhhem,stollo maybe) I could use some help with the stats variables, which will help the product of the stats better for the players. MSG me or PM me if you understand PHP.

-DeeX Cool

AlienSummoner
Offline
Joined: Oct 2004
Posts:
**UPDATE** ON . .::STATS::..

Nice Happy

[MR.]Stollo
Offline
Joined: Jul 2004
Posts:
**UPDATE** ON . .::STATS::..

You can count on me, dee Happy

Real men always attack from behind Winking

un(player)
Unplayer's picture
Offline
Joined: Jan 2004
Posts:
**UPDATE** ON . .::STATS::..

I bet that the problem with the cron job not executing vsp.php when all paths are relative,
is because the shell it opens inorder to execute has different environment variables than a normal users bash shell.

Commands are directly parsed to sh with only USER, LOGNAME, HOME, and SHELL set , and a PATH that defaults to a systemspecific content and NOT the PATH that is set upon login ( in bash_profile).

U might be able to overcome the anoyance of having to include the absolute path in a script located in a obscure place, by adding the path
to the PATH variable created when cron opens a shell.

U can add a PATH to the ur cron-table simply by editing the table (with crontab -e) and place in the top of the file the environment variable u
like.

PATH=/usr/bin;/home/snot/crap/some/strange/place
5 * * * * /path/to/somewere/vspq3

Another possibility that might work is to source the .bash_profile prior to the php script , like this:

5 * * * * source /home/.bash_profile
5 * * * * /path/to/somewere/vspq3

un(player)
Unplayer's picture
Offline
Joined: Jan 2004
Posts:
**UPDATE** ON . .::STATS::..

now that i think about u can verify if the above is the case.

place a cron job that executes this script :

xx xx * * * printenv >> $HOME/cronenvironment

then execute

printenv >> $HOME/loginenvironment

in ur login shell
and compare cronenvironment and loginenvironment

Anonymous
**UPDATE** ON . .::STATS::..

It was it. and now it works Thanks for all your help.
I set it to update the stats at 6am, 2pm, and 10pm all swedish times.
Thanks 12am, 8am, and 4pm US times. the server will shut down while updating and will be back online shortly after Winking