I am trying to run Laravel but I was getting a mcrypt error. I found more than one php on my mac so I decided to delete both and reinstall. However I can not seem to find instructions on how to install the php. Every thing I find already has the php installed and it is instructions on how to make them work by enabling. I need to know how to get it installed.
Any Mac built in the last 10 years comes with Apache and PHP installed and ready to go. All you need to do is run one command to start apache (
apachectl start) and un-comment 1-2 lines in httpd.conf. installing massive packages that leave you with multiple copies is NOT necessary.
If you want a friendly interface and a box to check, get Apple's Server application.
One method is to download MacPorts from https://www.macports.org/install.php. Once done, run the command
sudo port selfupdate then
sudo port install php56 (which means php5.6. Adapt that for whichever version you need). You can also type
port search php56 (or whichever version you chose) to get a list of PHP packages available for that version.
Laravel Homestead is what you need.
Laravel Homestead is an official, pre-packaged Vagrant "box" that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server, and any other server software on your local machine. No more worrying about messing up your operating system! Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in minutes!
Just have your Vagrant installed, then set up the laravel/homestead box.