Trying to get PEAR working on Mac OSX Lion
Results 1 to 6 of 6

Thread: Trying to get PEAR working on Mac OSX Lion

  1. #1
    Senior Member
    Join Date
    Nov 2002
    Posts
    533

    Trying to get PEAR working on Mac OSX Lion

    I installed Pear using instructions found here:
    http://blog.stealth35.com/2011/07/27...-osx-lion.html

    All this went fine, but phpinfo is still showing "--without-pear". I tried restarting Apache but didn't help.

    What else do I need to do to enable Pear?


    Thanks!

  2. #2
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,884
    Compare the instructions given there with those in http://pear.php.net/manual/en/instal...on.getting.osx and make sure that whoever wrote those other instructions knows what they're talking about.

    Then use the instructions for checking that PEAR is installed given at http://pear.php.net/manual/en/installation.checking.php

    As far as I recall, PEAR doesn't modify the output of phpinfo(), since it's just PHP packages, not binaries compiled into PHP.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  3. #3
    Senior Member
    Join Date
    Nov 2002
    Posts
    533
    OK thanks - that was very helpful.

    The instructions you reference require wget which didn't seem to be available to me in the command line, which is why I used the instructions I did.

    Running through the various tests I got that pear's include path should be /usr/lib/php/pear, but phpinfo() was telling me the include path was .:

    The line in php.ini for include path was commented out, with the value ".:/php/includes". I changed this to "/usr/lib/php/pear" - should I have left the ".:" before the first slash? Don't want to mess up anything that was working before.

    phpinfo now shows the include path as /usr/lib/php/pear of course.

    The test now works as it appears does my script. But worried I might have broken things (not yet discovered) by removing ".:" from the old path.

  4. #4
    Senior Member
    Join Date
    Nov 2002
    Posts
    533
    I do seem to have run into another problem - something in the pear file HTTP/Request.php is force-adding "www" on the beginning of my URL (http://mysite.dev becomes http://www.mysite.dev on my dev instance). It seems to be simply the act of requiring HTTP/Request.php - I'm not instantiating a class. When I remove the class HTTP_Request from the file Request.php the problem goes away. But can't figure out what in it might be forcing this redirect, especially since I'm not instantiating anything.

    Any thoughts?

  5. #5
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Systems Vehicle "Thrilled To Be Here"
    Posts
    21,884
    Quote Originally Posted by bunner bob
    I changed this to "/usr/lib/php/pear" - should I have left the ".:" before the first slash? Don't want to mess up anything that was working before.
    Yes, the include_path entry lists the directories in which PHP is supposed to look for included files (separated by colons). "." refers to the current directory of the script being executed - without it PHP won't think to look there.
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  6. #6
    Senior Member
    Join Date
    Nov 2002
    Posts
    533
    Super - thanks!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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