-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_debug.php
More file actions
41 lines (34 loc) · 1.51 KB
/
test_debug.php
File metadata and controls
41 lines (34 loc) · 1.51 KB
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
<?php
// Debug file to check server variables
echo "<h1>Server Variables Debug</h1>";
echo "<pre>";
echo "HTTP_HOST: " . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'NOT SET') . "\n";
echo "SERVER_NAME: " . (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : 'NOT SET') . "\n";
echo "REQUEST_URI: " . (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : 'NOT SET') . "\n";
echo "SCRIPT_NAME: " . (isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : 'NOT SET') . "\n";
echo "DOCUMENT_ROOT: " . (isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : 'NOT SET') . "\n";
echo "PHP_SELF: " . (isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : 'NOT SET') . "\n";
echo "\nAll SERVER variables:\n";
foreach ($_SERVER as $key => $value) {
if (strpos($key, 'HTTP_') === 0 || in_array($key, ['SERVER_NAME', 'REQUEST_URI', 'SCRIPT_NAME', 'DOCUMENT_ROOT', 'PHP_SELF'])) {
echo "$key: $value\n";
}
}
echo "\nInclude path: " . get_include_path() . "\n";
echo "Current working directory: " . getcwd() . "\n";
// Test config functions
echo "\nTesting config functions:\n";
if (file_exists('includes/config.php')) {
include 'includes/config.php';
echo "Config file loaded successfully\n";
if (function_exists('isLocalhost')) {
echo "isLocalhost(): " . (isLocalhost() ? 'true' : 'false') . "\n";
}
if (function_exists('getBaseURL')) {
echo "getBaseURL(): " . getBaseURL() . "\n";
}
} else {
echo "Config file not found\n";
}
echo "</pre>";
?>