Search code examples
phpdrupal-7mamp

How to install php 5.4.24


MAMP does not come with php 5.4.24, but my live site (on bluehost) uses 5.4.24. I have had error messages with Drupal that are very difficult to track down & fix. I believe it is because MAMP does not run with the same version of php as my live site.

I downloaded php 5.4.24, but it doesn't work with MAMP. Obviously I'm missing a step or two.

Is there a blog or "cook book" somewhere that gives step-by-step instructions for installing php 5.4.24 on MAMP?

Thanks!


Solution

  • Please note that PHP 5.4 is no longer actively supported. This is the reason why MAMP doesn't provide it any more.

    In addition, even if they did support 5.4, they would supply the latest revision of it, which is 5.4.45.

    I don't know Bluehost very well. Some vendors fix their PHP version to a specific revision, and keep it up-to-date by back-porting security patches into that specific revision. This may be why Bluehost is stuck on 5.4.24, which would otherwise be quite badly out of date and insecure.

    Nevertheless, 5.4 is out of support now, so Bluehost is being backward in still only offering this version. If at all possible, you should upgrade. I note that this help page states that they also support PHP 5.6.

    This will help you get a matching version on your local machine for development (you shouldn't need to worry about the patch revision number being the same, especially if Bluehost has the back-porting policy I described earlier).

    Another very good reason for upgrading now is that you will, at some point, have to upgrade anyway. As I say, 5.4 is already unsupported; Bluehost may be able to keep it running for now, but there will come a point where they can't keep running it securely, and they will have to drop support. You really want to be on a supported version before that happens, and if you have the chance to go straight to 5.6 now, I say you should take it.