- echo _("Error opening ") . $default_pref . '<br>';
- echo _("Could not create initial preference file!") . "<br>\n";
- echo _("Please contact your system administrator and report this error.") . "<br>\n";
+ $uid = 'httpd';
+ if (function_exists('posix_getuid')){
+ $user_data = posix_getpwuid(posix_getuid());
+ $uid = $user_data['name'];
+ }
+ $errString = $errTitle . '<br>' .
+ _("Could not create initial preference file!") . "<br>\n" .
+ sprintf( _("%s should be writable by user %s"), $data_dir, $uid ) .
+ "<br>\n" . _("Please contact your system administrator and report this error.") . "<br>\n";
+ include_once( '../functions/display_messages.php' );
+ logout_error( $errString, $errTitle );