PEAR error

Having trouble installing serendipity?
Post Reply
Guest

PEAR error

Post by Guest »

Hello,
I'm trying to install 0.8.2 from scratch and keep getting this error after completing the installation.

PHP Fatal error: Class 'PEAR' not found in /home/vhosts/thenewman.net/html/serendipity/bundled-libs/XML/RPC.php on line 41

The installation wizard says that everything is ok (all green/yellow). Any ideas?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PEAR error

Post by garvinhicking »

Please ask your server provider to include the "xml" extension. It seems that your "xml_parser_create" function is not available, even though that is mandatory!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Re: PEAR error

Post by Guest »

garvinhicking wrote:Please ask your server provider to include the "xml" extension. It seems that your "xml_parser_create" function is not available, even though that is mandatory!

Regards,
Garvin
Like the author said, the error occurs because the PEAR class is not called. Line 41 of the code states

Code: Select all

if (!function_exists('xml_parser_create')) {
    PEAR::loadExtension('xml');
}
which could simply be replaced with

Code: Select all

if (!function_exists('xml_parser_create')) {
	include("PEAR.php");
    PEAR::loadExtension('xml');
}

assuming your include paths are setup correctly.



however, this can't execute if the Pear class was not initiated or included.

It sounds to me, however, that you are saying s9y will not work even if the PEAR extension is loaded.

monte

{x:
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: PEAR error

Post by garvinhicking »

Serendipity usually bundles all required PEAR libraries; they are only put in our path structure and cannot be included via a simple include "PEAR.php" call. Most code has been changed in our bundled libraries so that this wouldn'T happen.

The problem just is that Serendipity depends on the xml_parse functions on many places, and presumable PEAR would also fail on trying to load the non-existant extension. This is the reason why I pointed my finger at the server admin and the xml-extension; that PEAR spaws this error is more a cosmetical issue and not related to PEAR itself.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

check file permissions

Post by Guest »

I got this message after I changed (chmod) file permissions.
It might be worth the check to see that those dirs are 755, etc.

Frank
Post Reply