Search code examples
phpapachemamp

Specify PHP version in MAMP


Using Mamp 3.3, the conf/apache/httpd.conf file has the following line to specify PHP:

LoadModule php5_module /Applications/MAMP/bin/php/php5.6.10/modules/libphp5.so

When I update the line to a different version of PHP e.g.

LoadModule php5_module /Applications/MAMP/bin/php/php5.4.29/modules/libphp5.so

As soon as I restart MAMP it automatically resets it back to 5.6.10. Is there a way to force a PHP version?


Solution

  • Found a solution for this in MAMP forums. Just rename PHP versions not required. For example after renaming the following, they are not shown in the preferences:

    /Applications/MAMP/bin/php/X_php5.6.10
    /Applications/MAMP/bin/php/X_php5.4.42