Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP and Pear - Install Question

David
Guest
 
Posts: n/a
#1: Sep 8 '05
I installed the Pear program and set the include path in php.ini to
point to the pear dir. I have a program which

<?
require_once("DB.php");

?>

This produces the error "Class 'PEAR_Error' not found in
c:\PHP\pear\PEAR\DB.php on line 868"

This is from defining an error class in the DB module that comes from
the PEAR.php module. Even though the DB.php has a require for the
PEAR.php, it appears that it is not being included .

I tried

<?
require_once("PEAR.php");
require_once("DB.php");

?>

but this does not appear to work wither.

I am lost if this is an issue with the Pear install, my system or PHP
setup, or just evil code!

I am running Win2k with Apache.

Also, when I do manually install PEAR.php, I sometimes get an runtime
error from Apache.

Andy Hassall
Guest
 
Posts: n/a
#2: Sep 8 '05

re: PHP and Pear - Install Question


On Thu, 08 Sep 2005 14:08:47 -0500, David <martindb@sbcglobal.net> wrote:
[color=blue]
>I installed the Pear program[/color]

What, precisely, did you do?
[color=blue]
>and set the include path in php.ini to
>point to the pear dir. I have a program which
>
><?
> require_once("DB.php");
>?>
>
>This produces the error "Class 'PEAR_Error' not found in
>c:\PHP\pear\PEAR\DB.php on line 868"[/color]

PEAR::Error is part of the core/bundled PEAR modules which could imply you've
not installed PEAR properly.
[color=blue]
>This is from defining an error class in the DB module that comes from
>the PEAR.php module. Even though the DB.php has a require for the
>PEAR.php, it appears that it is not being included .
>
>I tried
>
><?
> require_once("PEAR.php");
> require_once("DB.php");
>?>
>
>but this does not appear to work wither.
>
>I am lost if this is an issue with the Pear install, my system or PHP
>setup, or just evil code!
>
>I am running Win2k with Apache.
>
>Also, when I do manually install PEAR.php, I sometimes get an runtime
>error from Apache.[/color]

What error? How did you install it manually? What version of PHP? More details
please.

Since you're on Windows, did you use go-pear.bat?

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Mladen Gogala
Guest
 
Posts: n/a
#3: Sep 9 '05

re: PHP and Pear - Install Question


On Thu, 08 Sep 2005 14:08:47 -0500, David wrote:
[color=blue]
> Also, when I do manually install PEAR.php, I sometimes get an runtime
> error from Apache.[/color]

On Winduhs, you have to install PEAR manually, there is no other way.
Cunning plans will not help you. You have to execute go-pear.bat and
answer few questions about the target directories, the modules that you
want installed, your credit card numbers and your SSN.

--
http://www.mgogala.com

otrWalter@torres.ws
Guest
 
Posts: n/a
#4: Sep 9 '05

re: PHP and Pear - Install Question


> On Winduhs, you have to install PEAR manually, there is no other way.[color=blue]
> Cunning plans will not help you. You have to execute go-pear.bat and
> answer few questions about the target directories, the modules that you
> want installed, your credit card numbers and your SSN.[/color]

For the most part, this is true.

FOr a (almost) fool-proof plan on installing PEAR (as well as Apache,
Perl and PHP) on a windows box see documents at...

http://web.torres.ws/walters_way/

There is a method to that madness these documents spell out.

It's worked for me across 8 PC over the past 5 years.

Works on:
- 98
- NT|NT Server
- 2k Pro|Server
- XP Home|Pro
- 2k3 Server

Hope this helps you

Walter

Closed Thread