diff options
author | Josh Hoyt <josh@janrain.com> | 2006-02-09 18:05:45 +0000 |
---|---|---|
committer | Josh Hoyt <josh@janrain.com> | 2006-02-09 18:05:45 +0000 |
commit | a41c9fa1991d423f656d4911e7f9d047ec261fe1 (patch) | |
tree | 57141d30ca6d3e2d093482066c013e54aa78f232 /examples/detect.php | |
parent | 7a1d41fddf01129328d9cd926b3cfc9c0167d74a (diff) | |
download | php-openid-a41c9fa1991d423f656d4911e7f9d047ec261fe1.zip php-openid-a41c9fa1991d423f656d4911e7f9d047ec261fe1.tar.gz php-openid-a41c9fa1991d423f656d4911e7f9d047ec261fe1.tar.bz2 |
[project @ Make the detect script work when the posix extension is not found]
Diffstat (limited to 'examples/detect.php')
-rw-r--r-- | examples/detect.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/examples/detect.php b/examples/detect.php index 332e510..c484e58 100644 --- a/examples/detect.php +++ b/examples/detect.php @@ -324,8 +324,13 @@ function detect_stores($r, &$out) 'database engines.'; $out .= $r->p($text); - $processUser = posix_getpwuid(posix_geteuid()); - $web_user = $r->tt($processUser['name']); + if (function_exists('posix_getpwuid') && + function_exists('posix_geteuid')) { + $processUser = posix_getpwuid(posix_geteuid()); + $web_user = $r->tt($processUser['name']); + } else { + $web_user = 'the PHP process'; + } if (in_array('sqlite', $found)) { $out .= $r->p('If you are using SQLite, your database must be ' . |