Pear on a shared host problem
| From: | Karl Long | Date: | Sat, 27 Dec 2003 16:23:18 +0000 |
| Subject: | Pear on a shared host problem | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-9831@lists.php.net to get a copy of this message | ||
Hi all,
I've been wrestling with a pear installation on a shared host for a day or
two now and could really use some help.
I have ssh with the shared host so I followed the installation process
outlined in the manual:
pear -s -c ~/.pearrc -d doc_dir=~/pear/docs -d ext_dir=~/pear/ext -d
php_dir=~/pear/lib -d data_dir=~/pear/data -d test_dir=~/pear/tests -d
cache_dir=~/pear/cache -d bin_dir=~/pear/bin
that went pretty smoothly, pear is responding via the command line and is
installing packages etc. and has installed pear under my home directory on
the shared host.
I've added ~/pear/bin to the .bashrc file
I've set the permissions to 755 on the pear directories.
I've set up a web page to try out the XML/RSS.php but I keep getting the
error:
Warning: main(XML/RSS.php): failed to open stream: No such file or directory
in /home/virtual/site22/fst/var/www/html/rssTest.php on line 19
Fatal error: main(): Failed opening required 'XML/RSS.php'
(include_path='.:/php/includes:/usr/share/php:~/pear/lib')
in/home/virtual/site22/fst/var/www/html/rssTest.php on line 19
I have tried different approaches to changing the include path ~/pear/lib to
/home/<homedirectory>/pear/lib but it all seems to get the same result.
The page:
http://experiencecurve.com/rssTest.php
The code:
<?php
ini_set('include_path', ini_get('include_path').':~/pear/lib');
?>
<?php
require 'XML/RSS.php';
$feed = 'http://news.php.net/group.php?group=php.announce&format=rss';
$rss =& new XML_RSS($feed);
$rss->parse();
print "<ul>\n";
foreach ($rss->getItems() as $item) {
print '<li><a href="' . $item['link'] . '">'
. $item['title'] .
"</a></li>\n";
}
print "</ul>\n";
?>
Thanks for any help on this,
karl
--
network: http://www.ryze.com/?a=mrkook
blog: http://experiencecurve.com/competition/
aim|yim: kar11ong