PHP (PHP: Hypertext Preprocessor)
- is a widely-used open source general-purpose scripting language
- well suited for web development and can be embedded into HTML
Installation
Click here to expand...
homebrew 0. Mac comes preinstalled with PHP
php —version1. install php56 using homebrew
brew install homebrew/php/php56brew install php56this would download php56 into /usr/local/Cellar directory
1. to install with the .so php module for httpd.conf
xcode-select —installbrew uninstall php56 -with-httpd24brew install php56 —with-httpd24reinstall didn’t create the libphp.so file
brew reinstall php56 —with-httpd242. optional other versions and stuff
brew search phpbrew install <the name here>3. get version
php —-versionphp -v4. get PHP .ini file info
php -i | grep php.iniphp —-ini0. download the PHP package
1. un-package package - hehehe
gunzip -c php-5.x.tar.gztar -xvf php-5.x.tarcd php-5.x2. Configure and Build your PHP, assuming you are using MySQL database
./configure —with-apxs=/usr/sbin/apxs —with-mysql=/usr/bin/mysqlmakemake install