View Full Version : Where can I get PHP/Pear extension?

11-14-2006, 08:06 PM
Hi All,

I did this:
define("CTXPATH", "rqf/");

I've used this code: require_once(ABS_APP_PATH."/Statement.php"); directive and I got this error message:

Fatal error: main() [function.require]: Failed opening required 'c:/inetpub/wwwroot/Statement.php' (include_path='.;c:\php4\pear')

So i'm guessing that's because i'm missing the Pear extension, is that it?

I just just configured PHP 4.4 on my IIS 5.1 Server and it's works.
But does the message mean I need the Pear extension, isn't it available in the PHP Windows Installer?

Where do I download Pear? I went to the php.net website and I only saw pear for PHP 5

Plz help out if you can


11-14-2006, 08:13 PM
You need to post the code that is causing the error in order to get specific help.

Just because the error message lists the current include_path and that this mentions pear, does not mean that this has anything to do with pear.

11-14-2006, 08:38 PM
Constants my only contain - boolean, integer, float and string data. DOCUMENT_ROOT refers to a variable (the proper way to refer to it is $_SERVER['DOCUMENT_ROOT']) and you cannot make a defined constant the way it is.

Edit: Actually, if you do the following, the define does what you want it to -

define("ABS_APP_PATH", $_SERVER['DOCUMENT_ROOT']."/".CTXPATH);Edit2: Because your define has a trailing slash "rqf/" when you combine this with the "/Statement.php" you will end up with two slashes.

When in doubt what a constant or variable contains, echo it to make sure it contains the expected contents.