Skip to content

Commit

Permalink
try to find httpd via apxs instead of guess
Browse files Browse the repository at this point in the history
  • Loading branch information
jhdxr committed May 5, 2016
1 parent ff06a67 commit e0b3e0d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/PhpBrew/Utils/ApacheUtils.php
Expand Up @@ -33,11 +33,10 @@ public static function getExecutableApxs($apxs = '')
public static function getExecuatableHttpd($path = '')
{
if (empty($path)) {
$path = Utils::findbin('httpd');
}

if (empty($path)) { //for ubuntu
$path = Utils::findbin('apache2');
$apxs = self::getExecutableApxs();
$sbindir = trim(Utils::pipeExecute("$apxs -q sbindir"));
$progname = trim(Utils::pipeExecute("$apxs -q progname"));
$path = $sbindir . DIRECTORY_SEPARATOR . $progname;
}

if (!is_executable($path)) {
Expand Down

0 comments on commit e0b3e0d

Please sign in to comment.