Jump to content

PHP cannot find XML_Feed_Parser even though I just installed it.


10,000 BC Man

Recommended Posts

Hello,

 

My first post here. Great looking forum ! ;D

 

I am trying to install a simple RSS feed display function on this page.

 

I installed the XML_Feed_Parser from the Pear packages using cPanel. Even though I follow the examples on the Pear site, I get this error:

 

Fatal error: Class 'XML_Feed_Parser' not found in /home/djbarney/public_html/sdw/rss_test.php on line 7

 

Code ...

 

source = 'http://sourceforge.net/export/rss2_projnews.php?group_id=191008';

try {
    $feed = new XML_Feed_Parser($source);
} catch (XML_Feed_Parser_Exception $e) {
    die('Feed invalid: ' . $e->getMessage());
}

 

It needs DOM. I checked that by looking at the PHP info ... it is installed as an extension.

 

XML_Feed_Parser 1.0.2

PHP version 5.2.5

Linux, Apache.

 

BC Man

 

how did you access Pear to install XML_Feed_Parser via cPanel? i would expect cPanel to restart itself after a cPanel-initiated installation, but if you're using command line Pear, there may be no way for cPanel to know about the installation, so it would have no reason to restart apache.

 

another possibility: if you're not running the server (you're not root) but are a user on a virtual host on the server, installing XML_Feed_Parser may do nothing. if it's being installed locally but you're using the system (non-localized) PHP, it may not be installed. the results of your test script seem to indicate that it is not installed, at least not in the correct location.

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.