Re: Pear_Info

From: Date: Mon, 30 Jun 2003 21:15:50 +0000
Subject: Re: Pear_Info
References: 1 2  Groups: php.pear.dev php.pear.general 
Request: Send a blank email to pear-dev+get-17871@lists.php.net to get a copy of this message
Davey wrote:
Matrix wrote:
Hi.... I install pear on windows system.and install pear_info package already. I write first script on pear.This script show Pear Info. <? require_once 'PEAR/Info.php'; $path = ini_get('include_path');
This line is wrong, firstly, include_path may hold more than one path, PEAR_Info cannot handle this. And if PEAR is in the include_path, it will work anyways.
$info = new PEAR_Info;
You might actually want to pass that $path in (though as I've explained, its wrong) using: $info = new PEAR_Info($path);
$info->show(); ?> when run this script.It show error. What's happen?Help me,...............TOO.. Matrix
HTH, but as mentioned, an error would be very helpful, aswell as PHP, PEAR and PEAR_Info versions.. - Davey I tried the following on my W2k with PHP 4.3.1 and PEAR_Info 1.0.6:
require_once 'PEAR/Info.php'; $info = new PEAR_Info(); $info->show(); And I received the following output: PEAR Config bin_dir c:\php4 cache_dir C:\WINNT\TEMP\pear\cache cache_ttl 3600 data_dir c:\php4\pear\data doc_dir c:\php4\pear\docs ext_dir C:/Program Files/PHP/extensions master_server pear.php.net php_bin c:\php4\php.exe php_dir c:\php4\pear preferred_state stable sig_bin c:\gnupg\gpg.exe sig_keydir C:\WINNT\pearkeys sig_type gpg test_dir c:\php4\pear\tests umask 0 verbose 1 PEAR Packages Index Warning: Invalid argument supplied for foreach() in z:\php\pear\PEAR\Info.php on line 241 I don't know where the above mentioned PEAR Config is fetched from since all my PEAR-packages is installed on my z-drive! I'm using the PEAR-web installer and it seems to find my real configuration with PEAR located in Z:\PHP\Pear\ and PHP in C:\Program Files\PHP\ I don't know what I'm doing wrong but all my installed PEAR packages (27) seems to work fine except for this one... :-/ Just my 5 cents... Cheers, Tommy Ipsen

« previous php.pear.dev (#17871) next »