Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Issue #8 fix #31

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tests/Auth/OpenID/StoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ function test_mdb2store()
// The MDB2 test can use any database engine. MySQL is chosen
// arbitrarily.
if (!(extension_loaded('mysql') ||
@dl('mysql.' . PHP_SHLIB_SUFFIX)) ||
(function_exists('dl') && @dl('mysql.' . PHP_SHLIB_SUFFIX))) ||
!(@include_once 'MDB2.php')) {
print "(not testing MDB2 store)";
$this->pass();
Expand Down
2 changes: 1 addition & 1 deletion examples/detect.php
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ function detect_stores($r, &$out)

$found = array();
foreach (array('sqlite', 'mysql', 'pgsql') as $dbext) {
if (extension_loaded($dbext) || (ini_get('enable_dl') && dl($dbext . '.' . PHP_SHLIB_SUFFIX))) {
if (extension_loaded($dbext) || (ini_get('enable_dl') && function_exists('dl') && dl($dbext . '.' . PHP_SHLIB_SUFFIX))) {
$found[] = $dbext;
}
}
Expand Down
9 changes: 6 additions & 3 deletions examples/server/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,22 @@ function render_form() {

$sqlite_found = false;
if (extension_loaded('sqlite') ||
@dl('sqlite.' . PHP_SHLIB_SUFFIX)) {
(function_exists('dl') && @dl('sqlite.' . PHP_SHLIB_SUFFIX))
) {
$sqlite_found = true;
}

$mysql_found = false;
if (extension_loaded('mysql') ||
@dl('mysql.' . PHP_SHLIB_SUFFIX)) {
(function_exists('dl') && @dl('mysql.' . PHP_SHLIB_SUFFIX))
) {
$mysql_found = true;
}

$pgsql_found = false;
if (extension_loaded('pgsql') ||
@dl('pgsql.' . PHP_SHLIB_SUFFIX)) {
(function_exists('dl') && @dl('pgsql.' . PHP_SHLIB_SUFFIX))
) {
$pgsql_found = true;
}

Expand Down