PEAR Info Followup
| From: | Derek Downey | Date: | Thu, 02 Mar 2006 22:09:27 +0000 |
| Subject: | PEAR Info Followup | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-23207@lists.php.net to get a copy of this message | ||
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.
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?
Derek Downey
P.S. Just finished re-installing PHP and it didn't affect the
/usr/share/php/.registry folder at all