-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdiagnostics.php
95 lines (79 loc) · 2.82 KB
/
diagnostics.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
require_once (dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body>
<div class="wrap">
<h2>Social Connect Plugin Diagnostics</h2>
<p>
<h3>1. URL Rewrite</h3>
<?php
# {{{ Rewrite Diagnostics ?
$testing = @ $_REQUEST['url'];
if ( $testing == "http://www.example.com" ) {
echo "<b style='color:green;'>OK!</b> The rewrite rules on your server appear to be setup correctly for this plugin to work.";
}
else{
echo sprintf( '<b style="color:red;">FAIL!</b> Expected "http://www.example.com", received "%s".', $testing );
}
# }}} end Rewrite Diagnostics
?>
</p>
<hr />
<p>
<h3>2. System Requirements</h3>
<?php
# {{{ System Requirements ?
// check for php 5.2
echo "<h4>2.1 - PHP 5.2</h4>";
if ( version_compare( PHP_VERSION, '5.2.0', '>=' ) ){
echo "<b style='color:green;'>OK!</b> PHP >= 5.2.0 installed.";
}
else{
echo "<b style='color:red;'>FAIL!</b> PHP >= 5.2.0 not installed.";
}
// OAuth API 1.8 is not compatible with this plugin
echo "<h4>2.4 - OAuth API 1.8 plugin</h4>";
if( ! class_exists('OAuthException') ) {
echo "<b style='color:green;'>OK!</b> OAuth API plugin is disabled.";
}
else{
echo "<b style='color:red;'>FAIL!</b> OAuth API plugin enabled.<br /><b>OAuth API plugin</b> is not compatible with this plugin, and many providers like twitter and myspace wont work! Please disabled it!";
}
// PHP Curl extension [http://www.php.net/manual/en/intro.curl.php]
echo "<h4>2.2 - CURL Extension</h4>";
if ( function_exists('curl_init') ) {
echo "<b style='color:green;'>OK!</b> PHP Curl extension [http://www.php.net/manual/en/intro.curl.php] installed.";
}
else{
echo "<b style='color:red;'>FAIL!</b> PHP Curl extension [http://www.php.net/manual/en/intro.curl.php] not installed.";
}
// PHP JSON extension [http://php.net/manual/en/book.json.php]
echo "<h4>2.3 - JSON Extension</h4>";
if ( function_exists('json_decode') ) {
echo "<b style='color:green;'>OK!</b> PHP JSON extension [http://php.net/manual/en/book.json.php] installed.";
}
else{
echo "<b style='color:red;'>FAIL!</b> PHP JSON extension [http://php.net/manual/en/book.json.php] is disabled.";
}
// OAuth PECL extension is not compatible with this library
echo "<h4>2.4 - PECL OAuth Extension</h4>";
if( ! extension_loaded('oauth') ) {
echo "<b style='color:green;'>OK!</b> PECL OAuth extension [http://php.net/manual/en/book.oauth.php] not installed.";
}
else{
echo "<b style='color:red;'>FAIL!</b> PECL OAuth extension [http://php.net/manual/en/book.oauth.php] installed. OAuth PECL extension is not compatible with this library.";
}
# }}} end System Requirements
?>
</p>
<hr />
<p>
End of Diagnostics!
</p>
</div>
</body>
</html>