PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, May 14, 2022

[FIXED] What is the difference between PHP and libapache2_mod_php

 May 14, 2022     apache2, php, server, system-administration, ubuntu     No comments   

Issue

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 .


Solution

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: enter image description here

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).



Answered By - Siper
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing