Jump to content

running a pear package


drkstr

Recommended Posts

Hello,

 

I'm getting an error when I run a pear package and I'm not sure where to start looking. It seems like it might be some kind of configuration problem but I'm not sure.

 

When I run the php file that includes the pear package, I get the following error:

[Tue Jul 29 19:45:20 2008] [error] [client 71.227.145.81] PHP Fatal error: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'PEAR.php' (include_path='.:') in /usr/share/pear/XML/Serializer.php on line 30

 

I opened the source file to the pear package and all it has on line 30 is "require_once(PEAR.php)".

 

Any ideas what's wrong?

 

 

Thanks!

~Aaron

Link to comment
https://forums.phpfreaks.com/topic/117279-running-a-pear-package/
Share on other sites

I figured that much, but why would a PEAR package not be able to find PEAR.php? I shouldn't have to modify the source to a PEAR package so it makes me think there is something else wrong. I just don't know what. Any ideas?

 

 

Thanks!

~Aaron

 

**Edit**

Just so I'm clear, the error is coming from the pear package, not my script. Here is my script in it's entireity:

 

<?php

// include class file
require_once("XML/Serializer.php");

// create object
$serializer = new XML_Serializer();

// create array to be serialized
$xml = array ( "book" => array (
"title" => "Oliver Twist",
"author" => "Charles Dickens"));

// perform serialization
$result = $serializer->serialize($xml);

// check result code and display XML if success
if($result === true)
{
echo $serializer->getSerializedData();
}

?> 

 

XML/Serializer.php is the PEAR package.

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.