Click to See Complete Forum and Search --> : getrusage


Anon
09-18-2001, 09:13 AM
Warning: getrusage() is not supported in this PHP build in c:\inetpub\wwwroot\webmail\functions\strings.php on line 378

What does it mean?

I have
php-4.0.6
WinNT 4.0

This function is called:
// This function initializes the random number generator fairly well.
// It also only initializes it once, so you don't accidentally get
// the same 'random' numbers twice in one session.
function sq_mt_randomize()
{
global $REMOTE_PORT, $REMOTE_ADDR, $UNIQUE_ID;
static $randomized;

if ($randomized)
return;

// Global
sq_mt_seed((int)((double) microtime() * 1000000));
sq_mt_seed(md5($REMOTE_PORT . $REMOTE_ADDR . getmypid()));

// getrusage
if (function_exists('getrusage')) {
$dat = getrusage();
$Str = '';
foreach ($dat as $k => $v)
{
$Str .= $k . $v;
}
sq_mt_seed(md5($Str));
}

// Apache-specific
sq_mt_seed(md5($UNIQUE_ID));

$randomized = 1;
}

mithril
09-19-2001, 04:58 AM
Marian,

"Warning: getrusage() is not supported in this PHP build in c:\inetpub\wwwroot\webmail\functions\strings.php on line 378"

What does it mean? Means what it says, the getrusage() function is not supported in your build (read: version) of PHP. Though the manual doesn't say it, I'm suspecting that getrusage() is a *Nix only function since it appears to return the same info as a "who" call on a *Nix. There is no comparable system function for Win32. Further more, it can only return info about user logged onto the server itself (SSH sessions, daemon managers, etc..... not a client's browser).

geoff

Anon
09-19-2001, 05:15 AM
Hi Geoff,
I solved that problem. You are right about comparation with PWD.

Thanx

Marian