Bearsampp 2026.9.23
Loading...
Searching...
No Matches
pearcmd.php File Reference

Go to the source code of this file.

Namespaces

namespace  PEAR

Functions

 bearsamppRelocatePearRegistry ($pearDir)
 cmdHelp ($command)
 error_handler ($errno, $errmsg, $file, $line)
 usage ($error=null, $helpsubject=null)

Variables

 $_PEAR_PHPDIR = '#$%^&*'
 $all_commands = PEAR_Command::getCommands()
 $argv = Console_Getopt::readPHPArgv()
 $cmdopts = array()
if( $raw) foreach($opts as $opt) if( $store_system_config) if($store_user_config) $command = (isset($options[1][0])) ? $options[1][0] : null
 $config = &PEAR_Config::singleton($pear_user_config, $pear_system_config)
 $fetype = 'CLI'
 $options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV")
if(PEAR::isError($options)) $opts = $options[0]
 $pear_package_version = "1.10.18"
 $pear_system_config = ''
 $pearDir = Path::getPearPath() . '/pear'
if(php_sapi_name() !='cli' &&isset($argv[1]) && $argv[1]=='--') $progname = PEAR_RUNTYPE
 $raw = false
 $store_system_config = false
 $store_user_config = false
 $ui = &PEAR_Command::getFrontendObject()
 $verbose = 1
if($progname=='gpear'|| $progname=='pear-gtk') else
const PEAR_IGNORE_BACKTRACE (!defined('PEAR_RUNTYPE')) 1

Function Documentation

◆ bearsamppRelocatePearRegistry()

bearsamppRelocatePearRegistry ( $pearDir)

Makes the PEAR registry portable.

The committed .registry/*.reg files store every path relative to the Bearsampp root (e.g. core\libs\php\pear\pear\PEAR.php), so the bundle is relocatable. PEAR itself needs absolute paths because it consumes "installed_as" when listing and deleting installed package files and the "dirtree" keys when cleaning directories up on uninstall, so on every invocation each root-relative entry is resolved against the runtime root before the registry is read. The rewrite is idempotent; absolute entries left over from an older bundle are re-based as well.

Definition at line 46 of file pearcmd.php.

47{
48 $runtimeRoot = str_replace('\\', '/', rtrim(dirname($pearDir), '/\\'));
49 $runtimeRootWin = str_replace('/', '\\', $runtimeRoot);
50 $appRootWin = str_replace('/', '\\', dirname($pearDir, 5));
51 $registryDir = $pearDir . '/.registry';
52
53 if (!is_dir($registryDir)) {
54 return;
55 }
56
57 foreach (glob($registryDir . '/*.reg') as $registryFile) {
58 $content = @file_get_contents($registryFile);
59 if ($content === false) {
60 continue;
61 }
62
63 $relocated = preg_replace_callback(
64 '/(s:)\d+(:")([A-Za-z]:\\\\[^"]*|core\\\\libs\\\\php\\\\pear(?:\\\\[^"]*)?)(")/',
65 function ($match) use ($runtimeRoot, $runtimeRootWin, $appRootWin) {
66 $path = $match[3];
67
68 if (stripos($path, $runtimeRootWin) === 0 ||
69 stripos($path, $runtimeRoot) === 0) {
70 return $match[0]; // already points at the runtime location
71 }
72
73 // root-relative value committed for portability:
74 // core\libs\php\pear[anything] -> <approot>\core\libs\php\pear[anything]
75 if (preg_match('#^core\\\\libs\\\\php\\\\pear(?:\\\\[^"]*)?$#i', $path)) {
76 $path = $appRootWin . '\\' . $path;
77 return $match[1] . strlen($path) . $match[2] . $path . $match[4];
78 }
79
80 // legacy absolute path from a previously assembled bundle
81 if (preg_match('#^[A-Za-z]:\\\\[^\r\n"]*?\\\\pear$#i', $path)) {
82 return $match[1] . strlen($runtimeRootWin) . $match[2] .
83 $runtimeRootWin . $match[4];
84 }
85
86 if (preg_match(
87 '#^[A-Za-z]:\\\\[^\r\n"]*?\\\\pear\\\\(pear|tests|docs|data|cfg|scripts|doc)(.*)$#i',
88 $path,
89 $layout
90 )) {
91 $path = $runtimeRootWin . '\\' . $layout[1] . $layout[2];
92 return $match[1] . strlen($path) . $match[2] . $path . $match[4];
93 }
94
95 if (preg_match(
96 '#^[A-Za-z]:\\\\[^\r\n"]*?\\\\pear\\\\([^"\\\\]+)$#i',
97 $path,
98 $file
99 )) {
100 $path = $runtimeRootWin . '\\' . $file[1];
101 return $match[1] . strlen($path) . $match[2] . $path . $match[4];
102 }
103
104 return $match[0];
105 },
106 $content
107 );
108
109 if ($relocated !== null && $relocated !== $content) {
110 @file_put_contents($registryFile, $relocated);
111 }
112 }
113}
114
116$raw = false;
117@ini_set('allow_url_fopen', true);
118@set_time_limit(0);
119ob_implicit_flush(true);
120@ini_set('track_errors', true);
121@ini_set('html_errors', false);
122$_PEAR_PHPDIR = '#$%^&*';
123set_error_handler('error_handler');
124
125$pear_package_version = "1.10.18";
126
127require_once 'PEAR.php';
128require_once 'PEAR/Frontend.php';
129require_once 'PEAR/Config.php';
130require_once 'PEAR/Command.php';
131require_once 'Console/Getopt.php';
132
133
136
138// fix CGI sapi oddity - the -- in pear.bat/pear is not removed
139if (php_sapi_name() != 'cli' && isset($argv[1]) && $argv[1] == '--') {
140 unset($argv[1]);
141 $argv = array_values($argv);
142}
144array_shift($argv);
145$options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV");
146if (PEAR::isError($options)) {
148}
149
150$opts = $options[0];
151
152$fetype = 'CLI';
153if ($progname == 'gpear' || $progname == 'pear-gtk') {
154 $fetype = 'Gtk2';
155} else {
156 foreach ($opts as $opt) {
157 if ($opt[0] == 'G') {
158 $fetype = 'Gtk2';
159 }
160 }
161}
162
163$pear_user_config = '';
165$store_user_config = false;
167$verbose = 1;
168
169foreach ($opts as $opt) {
170 switch ($opt[0]) {
171 case 'c':
172 $pear_user_config = $opt[1];
173 break;
174 case 'C':
175 $pear_system_config = $opt[1];
176 break;
177 }
178}
179
182$config = &PEAR_Config::singleton($pear_user_config, $pear_system_config);
183
184if (PEAR::isError($config)) {
185 $_file = '';
186 if ($pear_user_config !== false) {
187 $_file .= $pear_user_config;
188 }
189 if ($pear_system_config !== false) {
190 $_file .= '/' . $pear_system_config;
191 }
192 if ($_file == '/') {
193 $_file = 'The default config file';
194 }
195 $config->getMessage();
196 $ui->outputData("ERROR: $_file is not a valid config file or is corrupted.");
197 // We stop, we have no idea where we are :)
198 exit(1);
199}
200
201// this is used in the error handler to retrieve a relative path
202$_PEAR_PHPDIR = $config->get('php_dir');
203$ui->setConfig($config);
204PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ui, "displayFatalError"));
205
206$verbose = $config->get("verbose");
207$cmdopts = array();
208
209if ($raw) {
210 if (!$config->isDefinedLayer('user') && !$config->isDefinedLayer('system')) {
211 $found = false;
212 foreach ($opts as $opt) {
213 if ($opt[0] == 'd' || $opt[0] == 'D') {
214 // the user knows what they are doing, and are setting config values
215 $found = true;
216 }
217 }
218 if (!$found) {
219 // no prior runs, try to install PEAR
220 $parent = dirname(__FILE__);
221 if (strpos($parent, 'scripts')) {
222 $grandparent = dirname($parent);
223 $packagexml = $grandparent . DIRECTORY_SEPARATOR . 'package2.xml';
224 $pearbase = $grandparent;
225 } else {
226 $packagexml = $parent . DIRECTORY_SEPARATOR . 'package2.xml';
227 $pearbase = $parent;
228 }
229 if (file_exists($packagexml)) {
230 $options[1] = array(
231 'install',
232 $packagexml
233 );
234 $config->set('php_dir', $pearbase . DIRECTORY_SEPARATOR . 'php');
235 $config->set('data_dir', $pearbase . DIRECTORY_SEPARATOR . 'data');
236 $config->set('doc_dir', $pearbase . DIRECTORY_SEPARATOR . 'docs');
237 $config->set('test_dir', $pearbase . DIRECTORY_SEPARATOR . 'tests');
238 $config->set(
239 'ext_dir',
240 $pearbase . DIRECTORY_SEPARATOR . 'extensions'
241 );
242 $config->set('bin_dir', $pearbase);
243 $config->mergeConfigFile($pearbase . 'pear.ini', false);
244 $config->store();
245 $config->set('auto_discover', 1);
246 }
247 }
248 }
249}
250foreach ($opts as $opt) {
251 $param = !empty($opt[1]) ? $opt[1] : true;
252 switch ($opt[0]) {
253 case 'd':
254 if ($param === true) {
255 die(
256 'Invalid usage of "-d" option, expected -d config_value=value, ' .
257 'received "-d"' . "\n"
258 );
259 }
260 $possible = explode('=', $param);
261 if (count($possible) != 2) {
262 die(
263 'Invalid usage of "-d" option, expected ' .
264 '-d config_value=value, received "' . $param . '"' . "\n"
265 );
266 }
267 list($key, $value) = explode('=', $param);
268 $config->set($key, $value, 'user');
269 break;
270 case 'D':
271 if ($param === true) {
272 die(
273 'Invalid usage of "-d" option, expected ' .
274 '-d config_value=value, received "-d"' . "\n"
275 );
276 }
277 $possible = explode('=', $param);
278 if (count($possible) != 2) {
279 die(
280 'Invalid usage of "-d" option, expected ' .
281 '-d config_value=value, received "' . $param . '"' . "\n"
282 );
283 }
284 list($key, $value) = explode('=', $param);
285 $config->set($key, $value, 'system');
286 break;
287 case 's':
288 $store_user_config = true;
289 break;
290 case 'S':
292 break;
293 case 'u':
294 $config->remove($param, 'user');
295 break;
296 case 'v':
297 $config->set('verbose', $config->get('verbose') + 1);
298 break;
299 case 'q':
300 $config->set('verbose', $config->get('verbose') - 1);
301 break;
302 case 'V':
303 usage(null, 'version');
304 case 'c':
305 case 'C':
306 break;
307 default:
308 // all non pear params goes to the command
309 $cmdopts[$opt[0]] = $param;
310 break;
311 }
312}
313
315 $config->store('system');
316}
317
319 $config->store('user');
320}
321
322$command = (isset($options[1][0])) ? $options[1][0] : null;
324 exit;
325}
326
327if ($fetype == 'Gtk2') {
328 if (!$config->validConfiguration()) {
329 PEAR::raiseError(
330 "CRITICAL ERROR: no existing valid configuration files found in " .
331 "files '$pear_user_config' or '$pear_system_config', " .
332 "please copy an existing configuration file to one of these " .
333 "locations, or use the -c and -s options to create one"
334 );
335 }
336 Gtk::main();
337} else {
const PEAR_ERROR_CALLBACK
Definition PEAR.php:28
static readPHPArgv()
Definition Getopt.php:349
static getopt2($args, $short_options, $long_options=null, $skip_unknown=false)
Definition Getopt.php:69
static getCommands()
Definition Command.php:299
static & getFrontendObject()
Definition Command.php:162
static setFrontendType($uitype)
Definition Command.php:194
$options
Definition pearcmd.php:145
$_PEAR_PHPDIR
Definition pearcmd.php:122
$verbose
Definition pearcmd.php:167
$config
Definition pearcmd.php:182
$fetype
Definition pearcmd.php:152
$ui
Definition pearcmd.php:181
$all_commands
Definition pearcmd.php:135
$pear_package_version
Definition pearcmd.php:125
if( $raw) foreach($opts as $opt) if( $store_system_config) if($store_user_config) $command
Definition pearcmd.php:322
bearsamppRelocatePearRegistry($pearDir)
Definition pearcmd.php:46
$pearDir
Definition pearcmd.php:31
$cmdopts
Definition pearcmd.php:207
usage($error=null, $helpsubject=null)
Definition pearcmd.php:414
$pear_system_config
Definition pearcmd.php:164
$store_user_config
Definition pearcmd.php:165
$raw
Definition pearcmd.php:116
if(PEAR::isError($options)) $opts
Definition pearcmd.php:150
$store_system_config
Definition pearcmd.php:166
if(php_sapi_name() !='cli' &&isset($argv[1]) && $argv[1]=='--') $progname
Definition pearcmd.php:143
$argv
Definition pearcmd.php:137
const PEAR_RUNTYPE
Definition peclcmd.php:28

References $pearDir.

◆ cmdHelp()

cmdHelp ( $command)

Return help string for specified command

Parameters
string$commandCommand to return help for
Returns
void

Definition at line 459 of file pearcmd.php.

460{
462 if ($command == "options") {
463 return
464 "Options:\n".
465 " -v increase verbosity level (default 1)\n".
466 " -q be quiet, decrease verbosity level\n".
467 " -c file find user configuration in `file'\n".
468 " -C file find system configuration in `file'\n".
469 " -d foo=bar set user config variable `foo' to `bar'\n".
470 " -D foo=bar set system config variable `foo' to `bar'\n".
471 " -G start in graphical (Gtk) mode\n".
472 " -s store user configuration\n".
473 " -S store system configuration\n".
474 " -u foo unset `foo' in the user configuration\n".
475 " -h, -? display help/usage (this message)\n".
476 " -V version information\n";
477 } elseif ($command == "shortcuts") {
479 $ret = "Shortcuts:\n";
480 foreach ($sc as $s => $c) {
481 $ret .= sprintf(" %-8s %s\n", $s, $c);
482 }
483 return $ret;
484
485 } elseif ($command == "version") {
486 return "PEAR Version: ".$GLOBALS['pear_package_version'].
487 "\nPHP Version: ".phpversion().
488 "\nZend Engine Version: ".zend_version().
489 "\nRunning on: ".php_uname();
490
491 } elseif ($help = PEAR_Command::getHelp($command)) {
492 if (is_string($help)) {
493 return "$progname $command [options] $help\n";
494 }
495
496 if ($help[1] === null) {
497 return "$progname $command $help[0]";
498 }
499
500 return "$progname $command [options] $help[0]\n$help[1]";
501 }
502
503 return "Command '$command' is not valid, try '$progname help'";
504}
static getShortcuts()
Definition Command.php:315
static getHelp($command)
Definition Command.php:376

References $all_commands, $command, $config, $progname, PEAR_Command\getHelp(), and PEAR_Command\getShortcuts().

Referenced by usage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ error_handler()

error_handler ( $errno,
$errmsg,
$file,
$line )

error_handler

Parameters
mixed$errnoError number
mixed$errmsgMessage
mixed$fileFilename
mixed$lineLine number

@access public

Returns
boolean

Definition at line 519 of file pearcmd.php.

520{
521 if ((!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80400) && ($errno & E_STRICT)) {
522 return; // E_STRICT
523 }
524 if ($errno & E_DEPRECATED) {
525 return; // E_DEPRECATED
526 }
527 if (!(error_reporting() & $errno) &&
528 isset($GLOBALS['config']) &&
529 $GLOBALS['config']->get('verbose') < 4
530 ) {
531 return false; // @silenced error, show all if debug is high enough
532 }
533 $errortype = array (
534 E_DEPRECATED => 'Deprecated Warning',
535 E_ERROR => "Error",
536 E_WARNING => "Warning",
537 E_PARSE => "Parsing Error",
538 E_NOTICE => "Notice",
539 E_CORE_ERROR => "Core Error",
540 E_CORE_WARNING => "Core Warning",
541 E_COMPILE_ERROR => "Compile Error",
542 E_COMPILE_WARNING => "Compile Warning",
543 E_USER_ERROR => "User Error",
544 E_USER_WARNING => "User Warning",
545 E_USER_NOTICE => "User Notice"
546 );
547 if (!defined('PHP_VERSION_ID') || PHP_VERSION_ID < 80400) {
548 $errortype[E_STRICT] = 'Strict Warning';
549 }
550 $prefix = $errortype[$errno];
551 global $_PEAR_PHPDIR;
552 if (stristr($file, $_PEAR_PHPDIR)) {
553 $file = substr($file, strlen($_PEAR_PHPDIR) + 1);
554 } else {
555 $file = basename($file);
556 }
557 print "\n$prefix: $errmsg in $file on line $line\n";
558 return false;
559}
$GLOBALS['_PEAR_default_error_mode']
Definition PEAR.php:46
if(!extension_loaded('winbinder')) if(!dl('php_winbinder.dll')) trigger_error("WinBinder extension could not be loaded.\n" E_USER_ERROR
Definition winbinder.php:14

References $_PEAR_PHPDIR, $GLOBALS, and E_USER_ERROR.

◆ usage()

usage ( $error = null,
$helpsubject = null )

Display usage information

Parameters
mixed$errorOptional error message
mixed$helpsubjectOptional subject/command to display help for
Returns
void

Definition at line 414 of file pearcmd.php.

415{
416 global $progname, $all_commands;
417 $stdout = fopen('php://stdout', 'w');
418 if (PEAR::isError($error)) {
419 fputs($stdout, $error->getMessage() . "\n");
420 } elseif ($error !== null) {
421 fputs($stdout, "$error\n");
422 }
423
424 if ($helpsubject != null) {
425 $put = cmdHelp($helpsubject);
426 } else {
427 $put = "Commands:\n";
428 $maxlen = max(array_map("strlen", $all_commands));
429 $formatstr = "%-{$maxlen}s %s\n";
430 ksort($all_commands);
431 foreach ($all_commands as $cmd => $class) {
432 $put .= sprintf($formatstr, $cmd, PEAR_Command::getDescription($cmd));
433 }
434 $put .=
435 "Usage: $progname [options] command [command-options] <parameters>\n".
436 "Type \"$progname help options\" to list all options.\n".
437 "Type \"$progname help shortcuts\" to list all command shortcuts.\n".
438 "Type \"$progname help version\" or ".
439 "\"$progname version\" to list version information.\n".
440 "Type \"$progname help <command>\" to get the help ".
441 "for the specified command.";
442 }
443 fputs($stdout, "$put\n");
444 fclose($stdout);
445
446 if ($error === null) {
447 exit(0);
448 }
449 exit(1);
450}
static getDescription($command)
Definition Command.php:360
cmdHelp($command)
Definition pearcmd.php:459

References $all_commands, $progname, cmdHelp(), exit, and PEAR_Command\getDescription().

Here is the call graph for this function:

Variable Documentation

◆ $_PEAR_PHPDIR

if (PEAR::isError( $config)) $_PEAR_PHPDIR = '#$%^&*'

Definition at line 122 of file pearcmd.php.

Referenced by error_handler().

◆ $all_commands

$all_commands = PEAR_Command::getCommands()

Definition at line 135 of file pearcmd.php.

Referenced by cmdHelp(), and usage().

◆ $argv

$argv = Console_Getopt::readPHPArgv()

Definition at line 137 of file pearcmd.php.

Referenced by System\_parseArgs(), and Console_Getopt\readPHPArgv().

◆ $cmdopts

$cmdopts = array()

Definition at line 207 of file pearcmd.php.

◆ $command

if($raw) foreach( $opts as $opt) if($store_system_config) if ( $store_user_config) $command = (isset($options[1][0])) ? $options[1][0] : null

Definition at line 322 of file pearcmd.php.

Referenced by ActionDebugBase\__construct(), PEAR_Builder\_build_win32(), PEAR_Command_Registry\_doInfo2(), PEAR_Command_Install\_filterUptodatePackages(), PEAR_Builder\_runCommand(), PEAR_Command_Package\_svnFindPath(), PEAR_Command_Package\_svnRemoveTag(), CommandRunner\background(), cmdHelp(), PEAR_Command_Channels\doAdd(), PEAR_Command_Channels\doAlias(), PEAR_Command_Build\doBuild(), PEAR_Command_Install\doBundle(), PEAR_Command_Remote\doClearCache(), PEAR_Command_Config\doConfigCreate(), PEAR_Command_Config\doConfigGet(), PEAR_Command_Config\doConfigHelp(), PEAR_Command_Config\doConfigSet(), PEAR_Command_Config\doConfigShow(), PEAR_Command_Package\doConvert(), PEAR_Command_Package\doCvsDiff(), PEAR_Command_Package\doCvsTag(), PEAR_Command_Channels\doDelete(), PEAR_Command_Channels\doDiscover(), PEAR_Command_Remote\doDownload(), PEAR_Command_Mirror\doDownloadAll(), PEAR_Command_Registry\doFileList(), PEAR_Command_Channels\doInfo(), PEAR_Command_Registry\doInfo(), PEAR_Command_Install\doInstall(), PEAR_Command_Channels\doList(), PEAR_Command_Registry\doList(), PEAR_Command_Registry\doListAll(), PEAR_Command_Remote\doListAll(), PEAR_Command_Remote\doListUpgrades(), PEAR_Command_Channels\doLogin(), PEAR_Command_Channels\doLogout(), PEAR_Command_Package\doMakeRPM(), PEAR_Command_Package\doPackage(), PEAR_Command_Pickle\doPackage(), PEAR_Command_Package\doPackageDependencies(), PEAR_Command_Package\doPackageValidate(), PEAR_Command_Remote\doRemoteInfo(), PEAR_Command_Remote\doRemoteList(), PEAR_Command_Install\doRunScripts(), PEAR_Command_Test\doRunTests(), PEAR_Command_Remote\doSearch(), PEAR_Command_Registry\doShellTest(), PEAR_Command_Package\doSign(), PEAR_Command_Package\doSvnTag(), PEAR_Command_Install\doUninstall(), PEAR_Command_Channels\doUpdate(), PEAR_Command_Channels\doUpdateAll(), PEAR_Command_Install\doUpgradeAll(), Nssm\exec(), PEAR_Command\factory(), PEAR_Command_Common\getCommands(), PEAR_Command\getDescription(), PEAR_Command\getGetoptArgs(), PEAR_Command_Common\getGetoptArgs(), PEAR_Command\getHelp(), PEAR_Command_Common\getHelp(), PEAR_Command_Common\getHelpArgs(), TplAestan\getItemPowerShell(), PEAR_Command\getObject(), PEAR_Command_Common\getOptions(), PEAR_Command_Common\getShortcuts(), ActionDebugBase\isSyntaxCheckCommand(), PEAR_Frontend\outputData(), PEAR_Frontend_CLI\outputData(), PEAR_Command\registerCommands(), PEAR_Command_Common\run(), CommandRunner\shellExec(), PEAR_Frontend\userDialog(), and PEAR_Frontend_CLI\userDialog().

◆ $config

◆ $fetype

$fetype = 'CLI'

Definition at line 152 of file pearcmd.php.

◆ $options

$options = Console_Getopt::getopt2($argv, "c:C:d:D:Gh?sSqu:vV")

Definition at line 145 of file pearcmd.php.

Referenced by PEAR_Downloader\__construct(), PEAR_Downloader_Package\__construct(), PEAR_Error\__construct(), PEAR_REST\__construct(), PEAR_REST_10\__construct(), PEAR_REST_11\__construct(), PEAR_RunTest\__construct(), PEAR_Downloader_Package\_analyzeDownloadURL(), PEAR_Downloader_Package\_detect1(), PEAR_Downloader_Package\_detect2(), PEAR_Downloader_Package\_detect2Dep(), PEAR_Command_Registry\_doInfo2(), PEAR_Downloader_Package\_fromFile(), PEAR_Downloader_Package\_fromString(), PEAR_Downloader_Package\_fromUrl(), PEAR_Installer\_installFile(), PEAR_Installer\_installFile2(), PEAR_Builder\_parseConfigureOptions(), PEAR\_popErrorHandling(), PEAR\_pushErrorHandling(), PEAR\_raiseError(), PEAR\_setErrorHandling(), PEAR_Command_Package\_svnRemoveTag(), BinMysql\changeRootPassword(), BinMysql\checkPort(), BinMysql\checkRootPassword(), PEAR_Downloader_Package\detectDependencies(), PEAR_Command_Channels\doAdd(), PEAR_Command_Channels\doAlias(), PEAR_Command_Build\doBuild(), PEAR_Command_Install\doBundle(), PEAR_Command_Remote\doClearCache(), PEAR_Command_Config\doConfigCreate(), PEAR_Command_Config\doConfigGet(), PEAR_Command_Config\doConfigHelp(), PEAR_Command_Config\doConfigSet(), PEAR_Command_Config\doConfigShow(), PEAR_Command_Package\doConvert(), PEAR_Command_Package\doCvsDiff(), PEAR_Command_Package\doCvsTag(), PEAR_Command_Channels\doDelete(), PEAR_Command_Channels\doDiscover(), PEAR_Command_Remote\doDownload(), PEAR_Command_Mirror\doDownloadAll(), PEAR_Command_Registry\doFileList(), PEAR_Command_Channels\doInfo(), PEAR_Command_Registry\doInfo(), PEAR_Command_Install\doInstall(), PEAR_Command_Channels\doList(), PEAR_Command_Registry\doList(), PEAR_Command_Registry\doListAll(), PEAR_Command_Remote\doListAll(), PEAR_Command_Remote\doListUpgrades(), PEAR_Command_Channels\doLogin(), PEAR_Command_Channels\doLogout(), PEAR_Command_Package\doMakeRPM(), PEAR_Command_Package\doPackage(), PEAR_Command_Pickle\doPackage(), PEAR_Command_Package\doPackageDependencies(), PEAR_Command_Package\doPackageValidate(), PEAR_Command_Remote\doRemoteInfo(), PEAR_Command_Remote\doRemoteList(), PEAR_Command_Install\doRunScripts(), PEAR_Command_Test\doRunTests(), PEAR_Command_Remote\doSearch(), PEAR_Command_Registry\doShellTest(), PEAR_Command_Package\doSign(), PEAR_Command_Package\doSvnTag(), PEAR_Command_Install\doUninstall(), PEAR_Command_Channels\doUpdate(), PEAR_Command_Channels\doUpdateAll(), PEAR_Command_Install\doUpgradeAll(), PEAR_Downloader_Package\fromDepURL(), PEAR_Command_Install\getDownloader(), PEAR_Command_Remote\getDownloader(), PEAR_Downloader_Package\initialize(), PEAR_Installer\install(), PEAR_Downloader_Package\isInstalled(), PEAR_Downloader_Package\mergeDependencies(), PEAR_Error\PEAR_Error(), PEAR_Downloader_Package\removeInstalled(), PEAR_Command_Common\run(), PEAR_Downloader\setOptions(), PEAR_Installer\setOptions(), PEAR\staticPopErrorHandling(), PEAR\staticPushErrorHandling(), and PEAR_Installer\uninstall().

◆ $opts

◆ $pear_package_version

$pear_package_version = "1.10.18"

Definition at line 125 of file pearcmd.php.

◆ $pear_system_config

$pear_system_config = ''

Definition at line 164 of file pearcmd.php.

◆ $pearDir

$pearDir = Path::getPearPath() . '/pear'

Definition at line 31 of file pearcmd.php.

Referenced by bearsamppRelocatePearRegistry().

◆ $progname

if (php_sapi_name() !='cli' &&isset( $argv[1]) &&$argv[1]=='--') $progname = PEAR_RUNTYPE

Definition at line 143 of file pearcmd.php.

Referenced by cmdHelp(), and usage().

◆ $raw

◆ $store_system_config

$store_system_config = false

Definition at line 166 of file pearcmd.php.

◆ $store_user_config

$store_user_config = false

Definition at line 165 of file pearcmd.php.

◆ $ui

◆ $verbose

◆ else

if(empty($command) &&($store_user_config|| $store_system_config)) if ( $fetype=='Gtk2') else
Initial value:
{
foreach ($opts as $opt) {
if ($opt[0] == 'G') {
$fetype = 'Gtk2';
}
}
}
$pear_user_config = ''

Definition at line 155 of file pearcmd.php.

155 {
156 foreach ($opts as $opt) {
157 if ($opt[0] == 'G') {
158 $fetype = 'Gtk2';
159 }
160 }
161}

◆ PEAR_IGNORE_BACKTRACE

const PEAR_IGNORE_BACKTRACE(!defined( 'PEAR_RUNTYPE')) ( ! defined 'PEAR_RUNTYPE') 1

Definition at line 23 of file pearcmd.php.