I’m new to system administration and while launching oho files with Apache 2 server I had to install php on my Ubuntu 16.04.
I tried the basic sudo apt-get install php
, which only loaded a blank page (php file).
But installing libapache2_mod_php
solved my problem.
I want to understand the differences .
Advertisement
Answer
It’s pretty simple: Apache is WWW Server, PHP – a interpretter. By libapache2_mod_php
library, the Apache can send request to the PHP, which builts website, sends rendered HTML (or whatever else) to the Apache, and it is later responsed to the user.
The flow is something like that:
without that library, the Apache don’t know what is .php
file, and recognizes it like raw file which can be downloaded, without being interpreted by PHP (sometimes it’s very dangerous, for example when you are storing passwords in PHP file).