Page 1 of 1

PEAR error

Posted: Tue Jul 19, 2005 4:50 pm
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?

Re: PEAR error

Posted: Tue Jul 19, 2005 6:17 pm
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

Re: PEAR error

Posted: Wed Aug 03, 2005 8:51 pm
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:

Re: PEAR error

Posted: Wed Aug 03, 2005 9:06 pm
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

check file permissions

Posted: Fri Aug 05, 2005 5:09 am
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