summaryrefslogtreecommitdiffstats
path: root/examples/detect.php
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-05-22 18:54:06 +0000
committertailor <cygnus@janrain.com>2007-05-22 18:54:06 +0000
commit0ab632d3be7f4b4e26bcea96134c38b16f26f80b (patch)
tree025a7766736b86346d1f721d842a61d9e04cbe13 /examples/detect.php
parent0469d359a8c58f6f032a836da166976510422b56 (diff)
downloadphp-openid-0ab632d3be7f4b4e26bcea96134c38b16f26f80b.zip
php-openid-0ab632d3be7f4b4e26bcea96134c38b16f26f80b.tar.gz
php-openid-0ab632d3be7f4b4e26bcea96134c38b16f26f80b.tar.bz2
[project @ Update detect.php script to check SSL support]
Diffstat (limited to 'examples/detect.php')
-rw-r--r--examples/detect.php30
1 files changed, 25 insertions, 5 deletions
diff --git a/examples/detect.php b/examples/detect.php
index e2d7c98..07106e7 100644
--- a/examples/detect.php
+++ b/examples/detect.php
@@ -97,7 +97,18 @@ class PlainText {
class HTML {
function start($title)
{
- return '<html><head><title>' . $title . '</title></head><body>' . "\n";
+ return '<html><head><title>' . $title . '</title>' .
+ $this->stylesheet().
+ '</head><body>' . "\n";
+ }
+
+ function stylesheet()
+ {
+ return "<style type='text/css'>\n".
+ "p {\n".
+ " width: 50em;\n".
+ "}\n".
+ '</style>';
}
function tt($text)
@@ -321,7 +332,8 @@ function detect_stores($r, &$out)
$text = $r->b($text);
}
$text .= ' The library supports the MySQL, PostgreSQL, and SQLite ' .
- 'database engines, as well as filesystem-based storage.';
+ 'database engines, as well as filesystem-based storage. In ' .
+ 'addition, PEAR DB is required to use databases.';
$out .= $r->p($text);
if (function_exists('posix_getpwuid') &&
@@ -397,9 +409,8 @@ function detect_fetcher($r, &$out)
$out .= $r->p('This PHP installation has support for libcurl. Good.');
} else {
$out .= $r->p('This PHP installation does not have support for ' .
- 'libcurl. CURL is not required, but some functionality, ' .
- 'such as fetching HTTPS URLs, will be missing and ' .
- ' performance will not be as good.');
+ 'libcurl. CURL is not required but is recommended. '.
+ 'The OpenID library will use an fsockopen()-based fetcher.');
$lnk = $r->link('http://us3.php.net/manual/en/ref.curl.php');
$out .= $r->p('See ' . $lnk . ' about enabling the libcurl support ' .
'for PHP.');
@@ -442,6 +453,15 @@ function detect_fetcher($r, &$out)
$ok = false;
$out .= $r->p('Fetching URL ' . $lnk . ' failed!');
}
+
+ if ($fetcher->supportsSSL()) {
+ $out .= $r->p('Your PHP installation appears to support SSL, so it ' .
+ 'will be able to process HTTPS identity URLs and server URLs.');
+ } else {
+ $out .= $r->p('Your PHP installation does not support SSL, so it ' .
+ 'will NOT be able to process HTTPS identity URLs and server URLs.');
+ }
+
return $ok;
}