|
@@ -168,8 +168,11 @@ function checkForPrefs($data_dir, $username, $filename = '') {
|
|
logout_error( $errString, $errTitle );
|
|
logout_error( $errString, $errTitle );
|
|
exit;
|
|
exit;
|
|
} else if (!@copy($default_pref, $filename)) {
|
|
} else if (!@copy($default_pref, $filename)) {
|
|
- $user_data = posix_getpwuid(posix_getuid());
|
|
|
|
- $uid = $user_data['name'];
|
|
|
|
|
|
+ $uid = 'httpd';
|
|
|
|
+ if (function_exists('posix_getuid')){
|
|
|
|
+ $user_data = posix_getpwuid(posix_getuid());
|
|
|
|
+ $uid = $user_data['name'];
|
|
|
|
+ }
|
|
$errString = $errTitle . '<br>' .
|
|
$errString = $errTitle . '<br>' .
|
|
_("Could not create initial preference file!") . "<br>\n" .
|
|
_("Could not create initial preference file!") . "<br>\n" .
|
|
sprintf( _("%s should be writable by user %s"), $data_dir, $uid ) .
|
|
sprintf( _("%s should be writable by user %s"), $data_dir, $uid ) .
|