PHP PEAR如何检查默认目录?

时间:2011-12-26 16:00:43

标签: php pear

在安装过程中,我看到了PEAR的不同默认目录。

稍后我可以通过任何命令列出这些目录吗?

pear.conf并没有帮助我搞清楚:(

$cat /etc/pear.conf

PEAR_Config 0.9 一个:11:{S:15: “preferred_state”; S:6: “稳定的”; S:8: “TEMP_DIR”; S:17: “/ TMP /梨/安装”; S:12: “download_dir”; S:17: “/ TMP /梨/安装”; S:7: “bin_dir”; S:8: “/ USR / BIN”; S:7: “php_dir”; S:15:“在/ usr /共享/梨 “; S:7:” doc_dir “; S:9:” 在/ usr /文档 “; S:8:” DATA_DIR “; S:9:” 在/ usr /数据 “; S:7:” cfg_dir“; S 8: “在/ usr / CFG”; S:7: “www_dir”; S:8: “在/ usr / www” 的; S:8: “test_dir”; S:10: “在/ usr /试验”; S: 10: “_ 信道”;一个:3:{S:5: “ _uri”;一个:0:{} S:11: “doc.php.net”;一个:0:{ } s:12:“pecl.php.net”; a:0:{}}} [root @ domU-12-31-39-02-2D-FD等

1. Installation base ($prefix)                   : /usr
2. Temporary directory for processing            : /tmp/pear/install
3. Temporary directory for downloads             : /tmp/pear/install
4. Binaries directory                            : /usr/bin
5. PHP code directory ($php_dir)                 : /usr/share/pear
6. Documentation directory                       : /usr/docs
7. Data directory                                : /usr/data
8. User-modifiable configuration files directory : /usr/cfg
9. Public Web Files directory                    : /usr/www
10. Tests directory                               : /usr/tests
11. Name of configuration file                    : /etc/pear.conf

1 个答案:

答案 0 :(得分:3)

您已找到存储这些信息的位置。它存储为对象序列化。

s:7:"bin_dir";s:8:"/usr/bin"

表示:字符串“bin_dir”(又名Binaries目录)字符串“/ usr / bin”

PEAR Manual

中所述pear config-show更为舒适
$ pear config-show
Configuration (channel pear.php.net):
=====================================
Auto-discover new Channels     auto_discover    <not set>
Default Channel                default_channel  pear.php.net
HTTP Proxy Server Address      http_proxy       <not set>
PEAR server [DEPRECATED]       master_server    pear.php.net
Default Channel Mirror         preferred_mirror pear.php.net
Remote Configuration File      remote_config    <not set>
PEAR executables directory     bin_dir          /usr/bin
PEAR documentation directory   doc_dir          /usr/share/php/doc
PHP extension directory        ext_dir          /usr/lib/php5/20090626+lfs
PEAR directory                 php_dir          /usr/share/php
PEAR Installer cache directory cache_dir        /tmp/pear/cache
PEAR configuration file        cfg_dir          /usr/share/php/cfg
directory
PEAR data directory            data_dir         /usr/share/php/data
PEAR Installer download        download_dir     /build/buildd/php5-5.3.6/pear-build-download
directory
PHP CLI/CGI binary             php_bin          /usr/bin/php
php.ini location               php_ini          <not set>
--program-prefix passed to     php_prefix       <not set>
PHP's ./configure
--program-suffix passed to     php_suffix       <not set>
PHP's ./configure
PEAR Installer temp directory  temp_dir         /tmp/pear/temp
PEAR test directory            test_dir         /usr/share/php/test
PEAR www files directory       www_dir          /usr/share/php/htdocs
Cache TimeToLive               cache_ttl        3600
Preferred Package State        preferred_state  stable
Unix file mask                 umask            2
Debug Log Level                verbose          1
PEAR password (for             password         <not set>
maintainers)
Signature Handling Program     sig_bin          /usr/bin/gpg
Signature Key Directory        sig_keydir       /etc/pear/pearkeys
Signature Key Id               sig_keyid        <not set>
Package Signature Type         sig_type         gpg
PEAR username (for             username         <not set>
maintainers)
User Configuration File        Filename         /home/cb/.pearrc
System Configuration File      Filename         /etc/pear/pear.conf