summaryrefslogtreecommitdiff
path: root/pear/scripts/pearcmd.php
diff options
context:
space:
mode:
Diffstat (limited to 'pear/scripts/pearcmd.php')
-rw-r--r--pear/scripts/pearcmd.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/pear/scripts/pearcmd.php b/pear/scripts/pearcmd.php
index b7d10e5e12..ff9366142e 100644
--- a/pear/scripts/pearcmd.php
+++ b/pear/scripts/pearcmd.php
@@ -29,7 +29,7 @@ if ('@include_path@' != '@'.'include_path'.'@') {
}
ini_set('allow_url_fopen', true);
if (!ini_get('safe_mode')) {
- set_time_limit(0);
+ @set_time_limit(0);
}
ob_implicit_flush(true);
ini_set('track_errors', true);
@@ -75,6 +75,11 @@ if ($progname == 'gpear' || $progname == 'pear-gtk') {
PEAR_Command::setFrontendType($fetype);
$ui = &PEAR_Command::getFrontendObject();
PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError"));
+if (ini_get('safe_mode')) {
+ $ui->outputData('WARNING: running in safe mode requires that all files created ' .
+ 'be the same uid as the current script. PHP reports this script is uid: ' .
+ @getmyuid() . ', and current user is: ' . @get_current_user());
+}
$pear_user_config = '';
$pear_system_config = '';
@@ -212,9 +217,6 @@ function usage($error = null, $helpsubject = null)
$put = cmdHelp($helpsubject);
} else {
$put =
- "Usage: $progname [options] command [command-options] <parameters>\n".
- "Type \"$progname help options\" to list all options.\n".
- "Type \"$progname help <command>\" to get the help for the specified command.\n".
"Commands:\n";
$maxlen = max(array_map("strlen", $all_commands));
$formatstr = "%-{$maxlen}s %s\n";
@@ -222,6 +224,11 @@ function usage($error = null, $helpsubject = null)
foreach ($all_commands as $cmd => $class) {
$put .= sprintf($formatstr, $cmd, PEAR_Command::getDescription($cmd));
}
+ $put .=
+ "Usage: $progname [options] command [command-options] <parameters>\n".
+ "Type \"$progname help options\" to list all options.\n".
+ "Type \"$progname help shortcuts\" to list all command shortcuts.\n".
+ "Type \"$progname help <command>\" to get the help for the specified command.";
}
fputs($stderr, "$put\n");
fclose($stderr);