summaryrefslogtreecommitdiffstats
path: root/examples/detect.php
diff options
context:
space:
mode:
authorShein Alexey <confik@gmail.com>2010-06-25 19:43:12 +0800
committerlillialexis <lillialexis@gmail.com>2010-07-20 02:59:55 +0800
commitacd70c0eb6d022cb124c3400094ccaada0c3e718 (patch)
tree0a82eaf04a684865c02216f690ddc2e898bb1efd /examples/detect.php
parentf1e22e150674e2e6e08f7b9d4d2ef5cbdcb394a6 (diff)
downloadphp-openid-acd70c0eb6d022cb124c3400094ccaada0c3e718.zip
php-openid-acd70c0eb6d022cb124c3400094ccaada0c3e718.tar.gz
php-openid-acd70c0eb6d022cb124c3400094ccaada0c3e718.tar.bz2
1. Added dl() existance checking.
2. Fixed a notice with absent $_GET parameter.
Diffstat (limited to 'examples/detect.php')
-rw-r--r--examples/detect.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/detect.php b/examples/detect.php
index 947fe4c..55fcaa8 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) || @dl($dbext . '.' . PHP_SHLIB_SUFFIX)) {
+ if (extension_loaded($dbext) || (ini_get('enable_dl') && dl($dbext . '.' . PHP_SHLIB_SUFFIX))) {
$found[] = $dbext;
}
}
@@ -401,15 +401,15 @@ function detect_query_corruption($r, &$out)
if ($_SERVER["QUERY_STRING"]!="test_query=a%26b")
{
$out.=$r->p("Your web server seems to corrupt queries. Received ".$_SERVER["QUERY_STRING"].", expected a=%26b. Check for mod_encoding.");
- return false;
+ return false;
}
else
{
$out.=$r->p("Your web server does not corrupt queries. Good.");
- return true;
+ return true;
}
}
-
+
function detect_fetcher($r, &$out)
{
$out .= $r->h2('HTTP Fetching');
@@ -483,11 +483,11 @@ function detect_fetcher($r, &$out)
}
header('Content-Type: ' . $r->contentType() . '; charset=us-ascii');
-if (!$_GET["test_query"])
+if (empty($_GET["test_query"]))
{
header("Location: ".$_SERVER['PHP_SELF']."?test_query=a%26b");
}
-
+
$title = 'OpenID Library Support Report';
$out = $r->start($title) .
$r->h1($title) .