summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Buckley <git@cmbuckley.co.uk>2011-05-03 18:04:07 +0100
committerChris Buckley <git@cmbuckley.co.uk>2011-05-03 18:04:07 +0100
commit1787658d1572edd3b0cdef0bd8c307e7b37384ea (patch)
treeaee6afc74332aee1ea83fcced0473b3ff131fd36
parent00676efc3722784e783fba217d54b3ee33bf833e (diff)
downloadphp-openid-1787658d1572edd3b0cdef0bd8c307e7b37384ea.zip
php-openid-1787658d1572edd3b0cdef0bd8c307e7b37384ea.tar.gz
php-openid-1787658d1572edd3b0cdef0bd8c307e7b37384ea.tar.bz2
fix for rest of dl() calls, also avoid ini_set() as may not work on safe_mode
-rw-r--r--Tests/Auth/OpenID/StoreTest.php2
-rw-r--r--examples/detect.php2
-rw-r--r--examples/server/setup.php6
3 files changed, 5 insertions, 5 deletions
diff --git a/Tests/Auth/OpenID/StoreTest.php b/Tests/Auth/OpenID/StoreTest.php
index 4ff9f22..0847619 100644
--- a/Tests/Auth/OpenID/StoreTest.php
+++ b/Tests/Auth/OpenID/StoreTest.php
@@ -657,7 +657,7 @@ class Tests_Auth_OpenID_Included_StoreTest extends Tests_Auth_OpenID_Store {
// 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();
diff --git a/examples/detect.php b/examples/detect.php
index 123e496..f745739 100644
--- a/examples/detect.php
+++ b/examples/detect.php
@@ -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) || (function_exists('dl') && @dl($dbext . '.' . PHP_SHLIB_SUFFIX))) {
$found[] = $dbext;
}
}
diff --git a/examples/server/setup.php b/examples/server/setup.php
index e25ef34..0a42bff 100644
--- a/examples/server/setup.php
+++ b/examples/server/setup.php
@@ -176,19 +176,19 @@ 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;
}