Re: PEAR Info Followup

From: Date: Thu, 02 Mar 2006 22:30:56 +0000
Subject: Re: PEAR Info Followup
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23208@lists.php.net to get a copy of this message
On 3/2/06, Derek Downey <derekd@pmtads.com> wrote: > Hey all, > I posted earlier about a problem with PEAR_Info hanging with a simple call. > I figured out the problem. I had, in my httpd.conf, disabled permissions to > any files outside of my base server directory and /usr. This meant that > /etc/pear.conf could not be read. This required me to print the config > variable out to figure out. Try turning on full PHP errors. error_reporting=E_ALL > Now, I have it reading the pear.conf file fine. The problem is now, I get > the error: > Warning: Invalid argument supplied for foreach() in > /usr/share/php/PEAR/Info.php on line 235 > > This occurs when looping through PEAR_Info::index variable (which should be > instantiated as an array, IMO). I found PEAR_Info attempting to push info > onto this variable as it was reading files from the /.registry directory. > > My issue is that while trying to find why it was hanging, I deleted > everything in the /usr/share/php directory (including the .registry folder) > reinstalling PEAR-PEAR and PEAR-PEAR_Info brought back the .registry folder, > but only had empty directories that began w/ a dot. I noticed that > PEAR_Registry ignores anything that begins with a dot. > > So, since there are no files in the .registry folder that PEAR_Registry > recognizes, $available is an empty array and thus, PEAR_Info::index has no > value (not even an empty array). > > How, then, can I get PEAR to get a list of packages? > You can't just install parts of PEAR. Just the PEAR package isn't enough. You need to use go-pear to reinstall PEAR. (http://go-pear.org) -- Justin Patrin

« previous php.pear.general (#23208) next »