PHP Information

What is PHP?

Hypertext Pre-processor (or PHP) is a very popular scripting language and is used to enhance web pages. PHP is a server-side language that is because the PHP doesn't get executed on your computer, but on the computer, you requested the page from. Once results are created they then, in turn, are handed over to you, and displayed in your browser. PHP is used by 75%+ of all websites that use a server-side programming language.


Where is PHP used?

PHP can be embedded in HTML, and it's well suited for web development and the creation of dynamic web pages for web applications, e-commerce applications, and database applications. It's considered a friendly language with abilities to easily connect with MySQL, Oracle, and other databases.

Real world examples of PHP are found in major CMS systems such as Wordpress, Joomla, and Drupal.


So PHP has different versions?

Yes, there are mulitple versions of PHP and they have release life cycles. Typically each php version has a life cycle that roughly lasts 2 years and.

Below is information directrectly from "The PHP Group" which releases the Official PHP Versions:

Branch Initial Release Active Support Until Security Support Until

7.1

1 Dec 2016

1 Dec 2018

1 Dec 2019

7.2

30 Nov 2017

30 Nov 2019

30 Nov 2020

7.3

6 Dec 2018

6 Dec 2020

6 Dec 2021

source - http://php.net/supported-versions.php

Branch Chart:

5.5 5.6 7.0 7.1 7.2 7.3 1 Jan 2016 1 Jan 2017 1 Jan 2018 1 Jan 2019 1 Jan 2020 1 Jan 2021 1 Jan 2022 1 Jan 2023

Key:

Active support A release that is being actively supported. Reported bugs and security issues are fixed and regular point releases are made.
Security fixes only A release that is supported for critical security issues only. Releases are only made on an as-needed basis.
End of life A release that is no longer supported. Users of this release should upgrade as soon as possible, as they may be exposed to unpatched security vulnerabilities.

source - http://php.net/supported-versions.php


What is the importance PHP code execution / PHP Mode / PHP Handlers

There are multiple ways to execute PHP scripts. FullSail Systems Offers four common PHP handlers across our Linux based servers:

  • Apache module
  • CGI
  • FastCGI
  • PHP-FPM

Apache Module (mod_php)

Executes PHP scripts on a web server as Apache. Every Apache worker is able to handle and execute PHP scripts itself removing the need to deal with any external processes.

Pros
  • PHP code executed by Apache
  • No external processes required
  • Very good performance on PHP heavy sites
  • PHP configuration settings may be customized within .htaccess directives
Cons
  • Makes each Apache process footprint larger – meaning more RAM used
  • Loads PHP interpreter for non-PHP content
  • Files created by PHP scripts are usually owned by the web server so you cannot edit them via FTP later

 


CGI

This way of running applications is considered to be the legacy way. Running PHP with CGI support requires a new process to be created each time any PHP code needs to be executed.

Pros

  • Better security than mod_php

Cons

  • Legacy Process
  • Poor performance

 


FastCGI

Executing PHP scripts with FastCGI requires each request to be passed from the web server to FastCGI via a communication socket.

Pros

  • Improved security
  • Static content is not processed by PHP interpreter
  • FTP Users can manage files without altering permissions afterwards

Cons

  • PHP requests are passed from web server
  • PHP directives cannot be used in .htaccess

 


PHP-FPM

Considered to be the alternative PHP FastCGI implementation with some additional features. PHP-FPM gives administrators the ability to gracefully stop and start PHP worker processes without losing any queries.

Pros

  • Smaller Memory Footprint
  • High Performance
  • Highly configurable options

Cons

  • Not widely accepted
  • Project relatively new