-
Notifications
You must be signed in to change notification settings - Fork 0
/
diagnostics.php
56 lines (42 loc) · 986 Bytes
/
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
<style>
body {
font-family:Consolas;
}
.pass {
color:green;
}
.fail {
color:red;
}
</style>
<a href='?phpinfo=true'>Run phpinfo()</a>
<?php if(isset($_GET['phpinfo'])): ?>
<a href='diagnostics.php'>← Go back</a>
<?php die(phpinfo()); ?>
<?php endif; ?>
<br><br>
<?php
$ini = ini_get_all();
$app_path = realpath(dirname(__FILE__)).'/';;
$doc_root = $_SERVER['DOCUMENT_ROOT'].'/';
$environment = file_exists($doc_root."../environment.php");
$core = file_exists($doc_root."../core/");
?>
Server API: <?php echo php_sapi_name(); ?>
<br>
APP Path: <?php echo $app_path ?>
<br>
Doc Root: <?php echo $doc_root; ?>
<br>
PHP Version: <?php echo phpversion(); ?>
<br><br>
<?php if($environment): ?>
<div class='pass'>environment.php exists</div>
<?php else: ?>
<div class='fail'>environment.php is missing</div>
<?php endif; ?>
<?php if($core): ?>
<div class='pass'>core/ exists</div>
<?php else: ?>
<div class='fail'>core/ is missing</div>
<?php endif; ?>