What is the simplest way to check if PHPSUEXEC or SUPHP is enabled, with a php script

StackOverflow https://stackoverflow.com/questions/2140297

  •  22-09-2019
  •  | 
  •  

Question

I need to check if PHPSUEXEC or SUPHP is enabled. How can I do that within a php script?

Was it helpful?

Solution

The easyiest way to check if its enables is something like this

ob_start();
phpinfo();
$sTmp ob_get_contents();
ob_end_clean();

$iPos = strripos($sTmp, "PHPSUEXEC"); //not sure how the string in phpinfo is spelled!!
if($iPos === false) {
 echo "not found";
} else {
 echo "found";
}

hope that helps!

Cheers,

Dennis

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top