Difference between PHP-CGI and PHP-FPM?

JTexan

Member
Collaborate
Registered
Joined
Dec 5, 2014
Messages
56
Points
8
I am confusing to use PHP-CGI or PHP-FPM for your websites on my web server? can anyone explain me what is the difference between PHP-CGI and PHP-FPM? many thanks!
 

sam@12

Member
Registered
Joined
Jun 8, 2021
Messages
62
Points
6
PHP CGI (Common Gateway Interface) is a web technology and protocol that defines a way for a web server (HTTP server) to interact with external applications, e.g. PHP. ... CGI is used as an interface between the web server and the additionally installed applications generating dynamic web content.

PHP-FPM (is a web tool used to speed up the performance of a website
 

Jim_wick

New member
Registered
Joined
Nov 2, 2021
Messages
1
Points
1
Let me tell you about both using simple Description and Pros and cons...

PHP-CGI
It is a specification “protocol” for transferring information between a Web server and a CGI program.
A CGI program is any program designed to accept and return data that conforms to the CGI specification. Basically you can say, it’s a way to run a server-side script (PHP, Perl, Python) when an HTTP request comes.
Pros
- It has Better security than FPM as PHP code execution is isolated from a web server.
Cons
- The legacy way of running applications.
- Very poor performance for busier websites.


PHP-FPM
PHP FastCGI Process Manager (PHP-FPM) is an alternative FastCGI daemon for PHP that allows a website to handle strenuous loads. PHP-FPM maintains pools (workers that can respond to PHP requests) to accomplish this. PHP-FPM is faster than traditional CGI-based methods, such as SUPHP, for multi-user PHP environments. It does not overload a system’s memory with PHP from Apache processes.

Advantages and Disadvantages:-
Pros
- It has a modern and optimized way of running applications.
- Robust performance for busier websites and low resources consumption.
- Smaller memory footprint, graceful reload without stopping other queries.
Cons
- Low security as compared to PHP-CGI.
- Requires more configuration than PHP-CGI.


Hope this clears your idea about PHP-CGI and PHP-FPM
Cheers - Jimmy Wick
 
Latest Threads
Replies
1
Views
15
Replies
0
Views
170
Replies
1
Views
36
Replies
2
Views
80
Recommended Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top