Turing on PHP in Mac OS 10.10

We had just started learning web programming and I had little knowledge of php. While working in a small assignment, I had to use php. My local server was working but php files would not open, in my MAC OS. I searched in internet and tried a lot of things, and I was able to set system document root at the preferred one, yet my php files would not open. Solution: You have to turn on PHP. By uncommenting a specific module i.e.: "LoadModule php5_module libexec/apache2/libphp5.so" in httpd.conf file. After you uncomment the module you have to save the changes, and then restart the server. Then you can check if it is working by filing a php file in the preferred document root and viewing in the browser. php, server configuration, web technologies web programming command line.

Comments

Interesting problem for MAC Users, and a good solution. I like the solution as once you've performed the steps you are set up for good. Thanks for the input.
Klaus Nigsch - Sun, 11/25/2018 - 12:15 :::
Interesting that I did not encounter the very same problem on my Mac, and I did open some .php Files under the same OS version. I also don't quite understand what do you mean by "open"? Just opem & see the source code or run it?
Daria Piacun - Mon, 12/10/2018 - 09:25 :::
1 answer