You need to run PHP 5.2.0 or newer for Magento. This is normally not a problem for MAMP but a recent reader has asked about determining which version is running on their Mac when this error does occur. I just wanted to make a quick post on checking PHP versions in MAMP, because it seems if your Mac has other versions of php installed you can end up having odd results when trying to run Magento in MAMP.
You can determine which PHP version your MAMP server is running by opening the MAMP ‘start page’ and clicking the phpInfo link in the top menu. This will also tell you which php.ini file is being used.
You can also run:
Run this in a terminal (Terminal.app), to print the PHP version that is on your PATH. You can determine which php is being run by typing:
To find any php binaries on your Mac you can run the
locate command in a terminal:
locate php | grep "[^\.]php$"
The pipe into grep just filters out any files that have php in the path, but are not php binaries, and also removes any files that are of the form
filename.php which would otherwise turn up in the search.
You can execute any of the php binaries this command finds with the argument
-version to find out what version of PHP it is. This may help you to identify any versions of PHP you have installed that you do not want anymore.
/usr/bin/php -version /Applications/MAMP/bin/php4/bin/php -version
If anyone has any other tips for solving this or questions please post them below. Hopefully we can make sure this problem doesn’t trip anyone else up!
6 thoughts on “Whoops: Magento supports PHP 5.2.0 or newer”
GADZOOKS! I have located an extra PHP using this method. Fantastic!
I suppose the question now is how to safely remove the undesired PHP. Or even better yet, just disable it. Google was not helpful on this one. The only way I know to do it is to comment it out in the apache config (httpd.conf). So I guess the next step is really to find out if another version of Apache is running? So I need to look deeper using my novice Terminal skills. I did an MDFIND httpd.conf and found a few suspects but none of the usual;
LoadModule php5_module libexec/apache2/libphp5.so
LoadModule fastcgi_module libexec/apache2/mod_fastcgi.so
to comment out. Perhaps there is a Includes calling the script? I did a MDFIND php5, but I did not find the culprit. Any suggestions?
Your site has been really helpful to me so far in getting MAMP going. I am getting the “whoops” error even though MAMP says I’m running 5.2.6.
When I run grep I get:
I unpacked Magento into the htdocs folder in the MAMP folder.
Do I have too many php versions? Is there some conflict between the Php that came with OS 10.5.6 and MAMP?
I ran the version checker on all instances and they all come back as either “this is a directory” or “command not found”. EXCEPT
which returns 5.2.6
And yes I do have MAMP set to use PhP 5. I’m stumped.
Does MAMP report 5.2.6 in it’s phpInfo page too? Can you try stopping MAMP and then browsing back to the store URL, I wonder if it’s possible Magento is actually running in another webserver, and not MAMP?
Well as usual it takes a reinstall. After a complete reinstall and complete reunpack of Magento I was able to get to the install panel. However, it just started looping when I got to the configuration screen. I set:
database name: magento
password: my password
base url: http://localhost/MYDOMAIN/magento/
admin path: admin
But when I click on continue it just keeps loaded this same page with no errors.
Also I did like you said and turned off MAMP and tried to reload the URL and got the page cannot be displayed so no second webserver which is good. 🙂
Yet I’m embarrassed to admit that I was using my user account password rather than “root” as the password for root. I never knew. I hope this is helpful to someone else.
Thanks Ashley for the great site and help!
Comments are closed.