Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fixed test for detecting php apc extension (postive result even if ap…
Browse files Browse the repository at this point in the history
…c was not loaded)
  • Loading branch information
bLoginow committed Apr 3, 2016
1 parent 81d9fdc commit 6cff34e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions core/src/core/tests/test.PHP_APC.php
Expand Up @@ -32,16 +32,15 @@ public function __construct() { parent::__construct("PHP APC extension", "Pydio
public function doTest()
{
$this->failedLevel = "warning";
$v = @extension_loaded('apc');
if (isSet($v) && (is_numeric($v) || strtolower($v) == "on")) {

if (extension_loaded('apc')) {
$this->failedInfo = "PHP APC extension detected, this is good for better performances";
$this->testedParams["PHP APC extension loaded"] = "Yes";
return TRUE;
} else {
$this->testedParams["PHP APC extension loaded"] = "No";
return FALSE;
} else if (!isSet($v)) {
$this->failedInfo = "Pydio framework loads a lot of PHP files at each query, and using a PHP accelerator is greatly recommanded.";
return FALSE;
}
$this->failedInfo = "PHP APC extension detected, this is good for better performances";
$this->testedParams["PHP APC extension loaded"] = "Yes";
return TRUE;
}
}

0 comments on commit 6cff34e

Please sign in to comment.