hello... I've some probs getting exec() to work, at least, I don't know where the error lies.
here's the code i'm trying to run:
$abuseLog = "/tmp/abuselog.log";
$logStr = "\""."$logDate $userIp $referer $userAgent"."\"";
$cmd = "echo $logStr >> $abuseLog";
putenv("HOME=/tmp");
putenv("USER=nobody");
exec($cmd, $error);
if I understood the manual of PHP right, the second variable in exec ($error) should give back the output of the command. but well... the logfile doesn't get written, and neither is any output in $error[0..10]. /tmp is rwxrwxrwx, so I think this shouldn't be the problem, and /tmp is the homedirectory of the user `'nobody" anyways (from passwd), so he should be able to write into this directory imho. does anyone know what could be wrong with my code above? i'm glad for every little hint about this!
thanks in advance
greetings
sweeper