Engine23
blogBannerImage
By Engine23

install PEAR and PHING for Mac

export PATH=/usr/local/bin:/Users/russell/:$PATH
export PATH=/Users/russell/pear/:$PATH
export PATH=/usr/bin/pear/bin/:$PATH
export PATH=/usr/local/bin:$PATH
PATH=$PATH:/usr/local/bin; export PATH

export PATH=/usr/local/bin:/Users/russell/:$PATHexport PATH=/Users/russell/pear/:$PATHexport PATH=/usr/bin/pear/bin/:$PATHexport PATH=/usr/local/bin:$PATHPATH=$PATH:/usr/local/bin; export PATHFrom terminal: Install pear in home directory or cd ~ if unsure cd /Users/yourusername ( enter ) OR cd ~ ( enter ) (The instructions came straight from http://pear.php.net/manual/en/installation.getting.php)

For a system-wide installation, you will need to execute the go-pear script with increased permissions. This is only recommended for advanced users.
        $ wget http://pear.php.net/go-pear.phar $ sudo php -d detect_unicode=0 go-pear.phar

Then in terminal run this command $ wget http://pear.php.net/go-pear.phar make sure you change the Installation Base: ( should be option 1 ) to /usr/bin/pear It is probably something like: 1. Installation base ($prefix) : /Users/usernamegoeshere/pear Change to: 1. Installation base ($prefix) : /usr/bin/pear 5. PHP code direcotry($php_dir) : /usr/lib/php Update .bash_profile $sudo nano .bash_profile ( enter ) Mine looks like:

export PATH=/usr/local/bin:/Users/russell/:$PATH
export PATH=/Users/russell/pear/:$PATH
export PATH=/usr/bin/pear/bin/:$PATH
export PATH=/usr/local/bin:$PATH
PATH=$PATH:/usr/local/bin; export PATH

PHING: From the command line:

$ pear channel-discover pear.phing.info

You need to change permissions on two folders to allow write access: via command line:

$ sudo chmod -R 777 /usr/local/

$ sudo chmod -R 777 /tmp/pear

Now you can install phing

$ pear install phing/phing