J
J
Johnny Mastricht2016-10-14 17:59:53
linux
Johnny Mastricht, 2016-10-14 17:59:53

Are CGI\FastCGI and just CGI the same thing?

I still can’t understand the clear difference when setting up PHP in these modes.
Looking at the phpinfo(); then we see CGI\FastCGI as ServerAPI.
1. Is it possible to configure PHP in such a way that only CGI is specified in the ServerAPI?
Or the fundamental difference here will be that FastCGI always uses suexec and then, by the connected suexec module, you can specifically say that FastCGI is now connected. And if suexec is not connected, then PHP is now working as CGI, although, again, we see CGI\FastCGI in the ServerAPI?
2. In both cases, the calls go to the php-cgi binary, which is located in the directory with the compiled PHP.
Well, the following construction is standardly indicated:
ScriptAlias ​​/cgi-bin /opt/php54/bin/
Action php-script /cgi-bin/php-cgi
AddHandler php-script .php
i.e. calls go to the /cgi-bin/php-cgi binary, and not just to /cgi-bin/php (although in the same dir there is one). Maybe here - /cgi-bin/php - is somehow related to "just CGI"? Although if you specify it as a handler, I get "500".
3. Why then is a wrapper used for FastCGI, which also indicates to execute /opt/php54/bin/php-cgi?
FCGIWrapper /opt/php52/bin/fcgiwrapper.sh
A little chaotically outlined, if I add anything in the comments.
The main question - when CGI \ FastCGI is specified in ServerAPI - how to understand which one of them is currently working?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question