Pear install for macports PHP5

前端 未结 4 1142
谎友^
谎友^ 2021-02-12 17:52

I have PHP5 installed via macports in /opt/local/..the default location for macports. There\'s no portfile for pear. If I do a standard pear install from the pear site what dire

4条回答
  •  渐次进展
    2021-02-12 18:34

    For those of you running PHP outside of MacPorts @Ben's answer, with the following modification, is actually the solution to the problem. I needed PEAR to install PHPUnit so I could do some unit testing but I use XAMPP.

    I followed Ben's solution but got an error when trying to install it. My error was:

    WARNING! The include_path defined in the currently used php.ini does 
    not contain the PEAR PHP directory you just specified:
    
    If the specified directory is also not in the include_path used by
    your scripts, you will have problems getting any PEAR packages working.
    
    Current include path           : .:
    Configured directory           : /opt/local/share/pear
    Currently used php.ini (guess) :
    

    I set the path of Currently used php.ini to the following and all worked perfectly:

    /Applications/XAMPP/xamppfiles/etc/php.ini

    Hope that at worst, this helps other XAMPP users!

提交回复
热议问题