Include/Require and PEAR

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Zaid
Forum Newbie
Posts: 5
Joined: Sat Oct 22, 2005 11:50 pm

Include/Require and PEAR

Post by Zaid »

Hi folks,

I am using php with IIS on my personal computer (localhost). I have tried using the include/require statements and it is giving me an error where it states that it cannot find the folder named: "c:\php5\pear"

I don't even have such a folder. And there is nothing in PHP.ini that points to such a folder.

In order to use include/require, do I need to have PEAR installed? I don't think it came with the PHP5 package I downloaded.

Any help would be greatly appreciated

Thanks,
Zaid
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

Look at the setting for include_path in php.ini :)

Change it to where the includes are (i.e. PEAR directory)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Simply read and follow the following: http://pear.php.net/manual/en/installation.php.
Afaik, go-pear.php is bundled with php distributions, but pear isn't installed by default...

You might also want to make sure/try out the option to install a "local" version of pear. This way, you can have your own pear configuration without having to depend on your webhost ;)
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post by Jenk »

timvw, he has already said he has installed on localhost.
Post Reply