Thread: PHP and Pear...

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2016
    Location
    Lakewood, WA
    Posts
    76
    Rep Power
    17

    PHP and Pear...


    This may be a "server" question...

    I have PHP installed.

    phpinfo() indecates '--without-pear'

    I've installed pear: # yum -y install php-pear

    Can I use pear in php scripts without recompiling PHP '-with-pear'?

    Or can I use an include with a path to the pear share?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jul 2003
    Posts
    4,238
    Rep Power
    601
    Search engines are your friend.
    https://pear.php.net/package/PEAR

    Use the PHP script to install PEAR.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2016
    Location
    Lakewood, WA
    Posts
    76
    Rep Power
    17
    Search engines are your friend.
    Sure.

    But maybe, you know, someone has personal experience / advice that addresses specific issues and so on? You know, things that can be expressed in response to a question about something that they have, you know, experienced under the same circumstances? Maybe something like that? Who knows, maybe someone has first hand experience with the same situation and might like to pass that on?

    My wild guess is that 90% of the questions here can be answered with enough Googling... Or maybe, just maybe someone knows something interesting or useful?

    Just a possibility...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2015
    Posts
    50
    Rep Power
    2
    I'd not use PEAR. Many packages on PEAR are not maintained regularly.

    Composer is an easy to install tool that seeks to replace (and has replaced) PEAR, and it does many things much better. Additionally, if you need to, you can install PEAR repositories via composer.
    Last edited by oakleaf; February 18th, 2017 at 06:28 PM.
  8. #5
  9. Confusing Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    15,932
    Rep Power
    9570
    What phpinfo() shows is the configure command, which was used to build PHP - the same PHP you installed when you did whatever command to install the core PHP system. What Linux distributions do is then make various extensions and whatnot available through packages you install through their repositories, which were built separately from PHP. That way you don't have to install a gigantic PHP with every extension when you don't need them all.

    The configure command shows you what is available in the base PHP system without needing other packages. --without-pear means PEAR does not come automatically with the build; if you want it then you install it separately (ie, with yum).

    So yes: you do not need to recompile PHP for it.
  10. #6
  11. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,523
    Rep Power
    4541
    I installed pear from yum in Fedora, works fine. I didn't have to do anything but yum install php-pear
    ======
    Doug G
    ======
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo