WebTechKitchen; Your Web Technology Kitchen, contact us to create, or maintain your websites and other digital properties.

Install alternative version of php on a mac with mac ports

Submitted by barnettech on Fri, 12/11/2009 - 16:06

Note I've found all these directions on making it work even when installing port php52 it simply does not work. I'm still trying to get this to work. ack.

http://2tbsp.com/content/install_apache_2_and_php_5_macports
http://typofree.org/article/archive/2009/august/title/macports-give-me-…
http://guide.macports.org/#development.local-repositories

If you need to uninstall MacPorts, and your port command is functioning, have it uninstall all the installed ports by typing this in the Terminal:


install php mysql with: sudo port install php52 +apache2 +php5-mysql +pear +php5-soap
uninstall with:  sudo port -f uninstall installed

-f is to force the install or uninstall.

to uninstall mac ports (this was the only way I could uninstall php 5.3)


sudo rm -rf \
    /opt/local \
    /Applications/DarwinPorts \
    /Applications/MacPorts \
    /Library/LaunchDaemons/org.macports.* \
    /Library/Receipts/DarwinPorts*.pkg \
    /Library/Receipts/MacPorts*.pkg \
    /Library/StartupItems/DarwinPortsStartup \
    /Library/Tcl/darwinports1.0 \
    /Library/Tcl/macports1.0 \
    ~/.macports