How can I tell if PHP is running in FCGI mode ?
phpinfo , sapi_name() returns always CGI/FCGI even when running in suPHP mode.
Is it possible to produce a php code that fails/work only with FCGI?
I know it is possible to force suPHP to fail when the script is owned by root, I am looking for the same kind of trick.
EDIT: found “PHP_FCGI_CHILDREN” in environnement only when i think fcgi is enabled , maybe that is it ?
suPHP runs PHP in CGI mode as a separate process, which is why you see
CGI/FCGI.When you run PHP in FastCGI mode, you can set particular environment variables, such as (what you mentioned)
PHP_FCGI_CHILDREN. This could be a way, but you could also modify the FastCGI wrapper script to define your own custom environment variable and test on that.