
I just had to find the module manually to write my own LoadModule line. Thanks to others who posted here it definitely helped and got me on the right track.

So if things fail, you can check to see if that's there.
#Core php for mac mac os
Then restart apache/httpd as described above, and hopefully you should be good. PHP runs on various platforms (Windows, Linux, Unix, Mac OS X, etc.) PHP is compatible with almost all servers used today (Apache, IIS, etc.) PHP supports a wide range of databases PHP is free. LoadModule php4_module libexec/httpd/libphp4.soĭirectly below that section should be the AddModules you need:Īnd then the AddType lines should be right after the language priorities (so after the AddCharset lines and after the LanguagePriority bit):ĪddType application/x-httpd-php-source. In the section with all the other LoadModules: So for those who are missing any of the lines, here are the full lines. I didn't know about the 'apachectl graceful' trick, though - since 'httpd -k restart' stopped working (probably around 10.2), I had just been doing it manually - find the process, kill it, and hit httpd again - thanks for the tip! Plus, the note above put a space in 'LoadModule' it has no space. I'm not sure why - I don't delete any of those I just comment them out if I'm not using them.

My nf had some of the lines, but not all of them - mine was missing the LoadModule and AddModule lines for php. The most interesting part is that Mac OS comes with the Apache web server and we just need to start it and make some changes to setup our development environment. Since Mac OS is ultimately built on Unix so it is very to install any Unix supporting software.

So the first step is to install Apache, PHP, and MySQL. However, if all you want is a quick Apache + PHP + MySQL/PostgreSQL setup on your laptop, this is certainly the easiest way to fly. This is likely to be quite an old build, and it probably lacks many of the less common extensions. In fact, your OS X probably came with Apache and PHP preinstalled. Mac users have the choice of either a binary or a source installation.
#Core php for mac how to
Or for parallel installation as a software collection, if you prefer to keep existing versions: yum install php74 Refer to Remi's blog post for additional information on how to install this depending on which OS version you're running. Yum-config-manager -enable remi-php74 yum update php.
