I've installed PECL for PHP on MAMP. Unfortunately, it is using php 5.3.6 which is different form the most recent version of PHP(which is 5.4.10 today). When looking a phpinfo, I see that it is not loading the php.ini file I want (5.3.6), it is loading the latest one (which is normal)
How to tell MAMP which version of PHP to use ?
Thanks
So in my case, MAMP had PHP 7.1.1 as the default version and the only other available choice in the UI that it was giving me was version 7.0.15. I didn't want to use PHP 7.x at all since my server was still on 5.6.x. However, MAMP came with PHP 5.6.30 but wasn't giving me the option to select it.
Navigate to the Hosts section to change the PHP version for each individual host. More information on how to change the PHP version for an individual host is covered in the Settings > Hosts > General section. PHP has several cache extensions that can help speed up execution in certain circumstances.
The trick is to rename whichever version of PHP you do not wish to use by putting an underscore ( _) character in front of the original directory name. This is done in the MAMP php directory ( /Applications/MAMP/bin/php ).
Check PHP Version Using the Command Line (Windows, Linux and macOS) 1. Type the PHP command: php -v 2. The php -v command works on Linux, macOS, Windows, and other supported systems. Its output contains the PHP version...
Check your Prefences pane. Should you want specific versions, you will need to install them manually or take a look at this thread.
1 - Download the desired version of PHP here (listed on the right).
2 - Two cases:
Either you have Mamp pro and you can change it through the user interface or you have the free version of Mamp and can achieve that, renaming each folder with for example .DIS
at the end at /Applications/MAMP/bin/php/
and just not renaming any version of php, plus the one that you are going to import and consequently copy-paste. This is because the free version of Mamp only allows you to see the two highest version of php through the user interface (for more information watch this video tutorial which will give you more details about the process to follow).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With