[nycphp-talk] problems with pear stuff
Adam Maccabee Trachtenberg
adam at trachtenberg.com
Fri Apr 9 13:19:07 EDT 2004
On Fri, 9 Apr 2004, Greg Faber wrote:
> I just tried to implement recipe # 12.11 from Adam's Cookbook re: RSS
> feeds.
Excellent. (BTW, it's actually Adam and David's Cookbook, but I wrote
the RSS Recipe.)
> I downloaded the following php files from pear:
> parser.php, tree.php, tree/node.php and rss.php but I get the following
> errors:
Did you use the PEAR package manager? (i.e. did you do "pear get
XML_RSS") Or did you somehow install the files manually?
I presume you used the package manager, but I want to be sure.
> Warning: main(PEAR.php): failed to open stream: No such file or
> directory in /var/www/html/XML/Parser.php on line 21
>
> Fatal error: main(): Failed opening required 'PEAR.php'
> (include_path='.:/php/includes:/usr/share/php') in
> /var/www/html/XML/Parser.php on line 21
>
> now, I checked and the pear.php is in usr/share not usr/share/php , but
> I don't know if that's necessarily the cause of the error. If you have
> any idea (which, honestly, I bet you do) please help me. This is my
> first incursion into pear territory...
Well, it looks like pear installed them in /usr/share instead of
/usr/share/php. That seems odd. What is the output of:
$ pear config-get php_dir
If it's /usr/share, you may want to change it to be /usr/share/php by
doing:
$ pear config-set php_dir /usr/share/php
Of course, this requires you to make the extra
directory. Alternatively, you can modify your include_path to add
/usr/share, but that seems sloppy because you don't want to dump all
your PHP files in /usr/share.
-adam
--
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!
More information about the talk
mailing list