This is a discussion on Can't get packageInfo in Apache within the PHP Language forums, part of the PHP Programming Forums category; Hi all, I can't get packageInfo of some packages installed on my system(Fedora Core 3 with bundled httpd ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi all,
I can't get packageInfo of some packages installed on my system(Fedora Core 3 with bundled httpd and php): # pear list Installed packages: =================== Package Version State Archive_Tar 1.1 stable Console_Getopt 1.2 stable DB 1.7.4 stable DB_Pager 0.7 stable HTTP 1.2.2 stable Log 1.8.7 stable Mail 1.1.3 stable Mail_Mime 1.2.1 stable Net_SMTP 1.2.6 stable Net_Socket 1.0.1 stable PEAR 1.3.2 stable XML_Parser 1.0.1 stable XML_RPC 1.1.0 stable I've a simple script to check existing of these modules: --------------------- cut here ----------------- <?php include_once ("PEAR/Remote.php"); // PEAR::Remote include_once ("PEAR/Registry.php"); // PEAR::Registry $pear = new PEAR_Config(); $pear_reg = new PEAR_Registry($pear->get('php_dir')); $pear_info = $pear_reg->packageInfo("PEAR"); $pear_version = $pear_info["version"]; print("PEAR Version:" . $pear_version . "\n"); $Log_info = $pear_reg->packageInfo("Log"); if (strlen($Log_info["package"]) < 2) { print("Can't find Log module\n"); } else { print("Log module found\n"); } ?> --------------------- cut here ----------------- It works if passing to php directly in bash. However, some of modules can't be located using this method (DB and Log) when run it through Apache. Would anyone pls help? My PEAR config follows. --------------------- cut here ----------------- Configuration: ============== PEAR executables directory bin_dir /usr/bin PEAR documentation directory doc_dir /usr/share/pear/doc PHP extension directory ext_dir /usr/lib/php4 PEAR directory php_dir /usr/share/pear PEAR Installer cache directory cache_dir /tmp/pear/cache PEAR data directory data_dir /usr/share/pear/data PHP CLI/CGI binary php_bin /usr/bin/php PEAR test directory test_dir /usr/share/pear/test Cache TimeToLive cache_ttl 3600 Preferred Package State preferred_state stable Unix file mask umask 22 Debug Log Level verbose 1 HTTP Proxy Server Address http_proxy <not set> PEAR server master_server pear.php.net PEAR password (for password <not set> maintainers) Signature Handling Program sig_bin /usr/bin/gpg Signature Key Directory sig_keydir /etc/pearkeys Signature Key Id sig_keyid <not set> Package Signature Type sig_type gpg PEAR username (for username <not set> maintainers) --------------------- cut here ----------------- Thanks a lot. /ST wong |