C
C
Christina Vogel2016-07-09 09:01:04
linux
Christina Vogel, 2016-07-09 09:01:04

What mode is php running in?

Hello! How to find out in what mode php works on apache, in CGI or in FastCGI? And then I switch, and in the results of phpinfo, in both cases it says "CGI / FastCGI".

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim Alekhin, 2016-07-09
@Settler1

Unless, indirectly, in phpinfo() look at the path to php.ini, maybe it looks like something like
Or search for "fpm" or "php-fpm", "php-cgi" you might find something that you can use for verification.
*fpm - fastcgi
I also remembered: if php-fpm is running, then there should be a process, you can check it through the unix command
In php it will be like this:
But it will not work if both php-cgi and php-fpm are running at the same time

K
Konstantin, 2016-07-09
@unity_ultra_hardcore

php_sapi_name will return 'fpm-fcgi' in case of fpm and 'cli' in case of cli.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question