[GRASSLIST:865] r,stats(In GRASSLinks)

Dear GRASS users

I'm trying to let GRASSlinks work on GRASS5.0.2.
GRASSLinks has original command "reporter" in /*/grasslinks/prog .
"reporter" uses "r.stats" command.

I have some question.

1) GRASSLinks original script is the following.
r.stats -aqlz fs="^" input=$GRASTER1,$GRASTER2 > $TMP_PATH/stats.$$
but there is a message "Sorry, <z> is not a valid flag" in Apache's error log.

What option does "r.stats" work?

2) I tried to removed "z" option.
I executed
r.stats -aql fs="^" input=$GRASTER1,$GRASTER2 > $TMP_PATH/stats.$$ .

Then There is a messeage as follows in Apache's errorlog.

sh: line 1: cd: HOME not set
WARNING: can't read range file for [landuse in PERMANENT]
ERROR: r.stats: can't read range for [landuse]

Why Can't r.stats open range file?

Please give me your suggestion.
Thank you in advance.
Sincerely yours.

----
Hayashi Shin'ichiro
mail:forest@bres.tsukuba.ac.jp URL:http://ryuiki.agbi.tsukuba.ac.jp/~forest
Watershed Management Lab., University of TSUKUBA