diff options
author | Greg Beaver <cellog@php.net> | 2005-03-28 16:38:59 +0000 |
---|---|---|
committer | Greg Beaver <cellog@php.net> | 2005-03-28 16:38:59 +0000 |
commit | 9752cbde1201f3e7b74dc67310cc5cd840a17443 (patch) | |
tree | 712cc60472df2258ac498c43cee8234a985a25e2 /pear/scripts | |
parent | a3f2a3aab50051a626d830e57287d1b354416f36 (diff) | |
download | php-git-9752cbde1201f3e7b74dc67310cc5cd840a17443.tar.gz |
merge in PEAR 1.3.5
Diffstat (limited to 'pear/scripts')
-rw-r--r-- | pear/scripts/pearcmd.php | 15 |
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); |