added cpanel support
This commit is contained in:
parent
97fdac0bdd
commit
b4e044b199
@ -27,6 +27,21 @@ class PhpExecutableFinder
|
|||||||
//$this->executableFinder = new ExecutableFinder();
|
//$this->executableFinder = new ExecutableFinder();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isCpanel()
|
||||||
|
{
|
||||||
|
return is_dir('/usr/local/cpanel');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isPlesk()
|
||||||
|
{
|
||||||
|
return is_dir('/usr/local/psa');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function isVirtualmin()
|
||||||
|
{
|
||||||
|
return is_dir('/usr/share/webmin');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Finds The PHP executable.
|
* Finds The PHP executable.
|
||||||
*
|
*
|
||||||
@ -36,7 +51,11 @@ class PhpExecutableFinder
|
|||||||
{
|
{
|
||||||
# @override
|
# @override
|
||||||
// Not working on shared hosting due to "open_basedir" restriction applied by cPanel/Plesk
|
// Not working on shared hosting due to "open_basedir" restriction applied by cPanel/Plesk
|
||||||
|
if ($this->isCpanel()) {
|
||||||
|
return '/usr/local/bin/php';
|
||||||
|
} else {
|
||||||
return 'php';
|
return 'php';
|
||||||
|
}
|
||||||
|
|
||||||
if ($php = getenv('PHP_BINARY')) {
|
if ($php = getenv('PHP_BINARY')) {
|
||||||
if (!is_executable($php)) {
|
if (!is_executable($php)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user