summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Tests/Auth/OpenID/StoreTest.php2
-rw-r--r--examples/detect.php2
-rw-r--r--examples/discover.php28
-rw-r--r--examples/server/setup.php6
4 files changed, 19 insertions, 19 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 aa717c8..3c13a5a 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/discover.php b/examples/discover.php
index 31e6b61..29f6718 100644
--- a/examples/discover.php
+++ b/examples/discover.php
@@ -31,7 +31,7 @@ $identifier = getOpenIDIdentifier();
<input type="text" name="openid_identifier" size="40" />
<input type="submit" value="Begin" />
</form>
-<?
+<?php
if ($identifier) {
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
@@ -39,27 +39,27 @@ if ($identifier) {
$identifier, $fetcher);
?>
- <h3>Discovery Results for <?= escape($identifier) ?></h3>
+ <h3>Discovery Results for <?php echo escape($identifier) ?></h3>
<table cellpadding="7" cellspacing="0">
<tbody>
<tr>
<th>Claimed Identifier</th>
- <td><?= escape($normalized_identifier) ?></td>
+ <td><?php echo escape($normalized_identifier) ?></td>
</tr>
-<?
+<?php
if (!$endpoints) {
?>
<tr>
<td colspan="2">No OpenID services discovered.</td>
</tr>
-<?
+<?php
} else {
?>
<tr>
<td colspan="2">Discovered OpenID services:</td>
</tr>
-<?
+<?php
foreach ($endpoints as $endpoint) {
?>
<tr>
@@ -67,34 +67,34 @@ foreach ($endpoints as $endpoint) {
</tr>
<tr>
<th>Server URL</th>
- <td><tt><?= escape($endpoint->server_url) ?></tt></td>
+ <td><tt><?php echo escape($endpoint->server_url) ?></tt></td>
</tr>
<tr>
<th>Local ID</th>
- <td><tt><?= escape($endpoint->local_id) ?></tt></td>
+ <td><tt><?php echo escape($endpoint->local_id) ?></tt></td>
</tr>
<tr>
<td colspan="2">
<h3>Service types:</h3>
<ul>
-<?
+<?php
foreach ($endpoint->type_uris as $type_uri) {
?>
- <li><tt><?= escape($type_uri) ?></tt></li>
-<?
+ <li><tt><?php echo escape($type_uri) ?></tt></li>
+<?php
}
?>
</ul>
</td>
</tr>
-<?
+<?php
}
}
?>
</tbody>
</table>
-<?
+<?php
}
?>
</body>
-</html> \ No newline at end of file
+</html>
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;
}