Aug 21, 2019

MacOS Apache PHP : Test your WebServices Quickly

I always wanted to write about how easy it is to get an HTML server and PHP scripting running on MacOS. I had almost forgotten about it, when recently a young adult asked me an easy way to host (test) web services programming. So here's to the young ones ...

1.  In you MacOS Terminal type command apachectl start
2.  In your browser go to http://localhost/
3.  It Works !. (means apache - HTML server is up and running).
4. Start having fun with Javascript, CSS, HTML stuff at this point.
5.  Enable PHP : Open /etc/apache2/httpd.conf
6.  uncomment the LoadModule php5_module line by removing the # sign.
7.  Back on the terminal, apachectl restart
8.  vim /Library/WebServer/Documents/phpinfo.php
9.  Type <?php phpinfo(); ?>
10. (If necessary) chmod 777 phpinfo.php
11. Back on browser http://localhost/phpinfo.php, now loads the output of the phpinfo() function and PHP Works !.
12. Start having fun with PHP stuff at this point. In just a few steps you are having a webserver at your finger tips. I will add more stuff to this blog .. keep the real way to code alive you young ones .. go grab those stars.

Whatsapp Button works on Mobile Device only

Start typing and press Enter to search