Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    105
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Where can I get PHP/Pear extension?

    Hi All,


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


    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

    thx
    Last edited by LondonBoy; 11-14-2006 at 07:12 PM.

  2. #2
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,962
    Thanks
    3
    Thanked 475 Times in 464 Posts
    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.
    Finding out HOW to do something is called research, i.e. keep searching until you find the answer. After you attempt to do something and cannot solve a problem with it yourself, would be when you ask others for help.

  3. #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,962
    Thanks
    3
    Thanked 475 Times in 464 Posts
    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 -
    PHP Code:
    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.
    Last edited by CFMaBiSmAd; 11-14-2006 at 07:57 PM.
    Finding out HOW to do something is called research, i.e. keep searching until you find the answer. After you attempt to do something and cannot solve a problem with it yourself, would be when you ask others for help.


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •