-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
38 lines (31 loc) · 1.27 KB
/
test.php
File metadata and controls
38 lines (31 loc) · 1.27 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
<?php
// Test Basic PHP Error Reporting
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
echo "<h1>PHP Test Script</h1>";
// Test 1: Check PHP Version
echo "<h2>PHP Version</h2>";
echo "<p>Current PHP Version: " . phpversion() . "</p>";
// Test 2: Check File Path Access
echo "<h2>File Access Test</h2>";
$autoload_path = __DIR__.'/../eunixmac_api/vendor/autoload.php';
echo "<p>Checking for file: " . $autoload_path . "</p>";
if (file_exists($autoload_path)) {
echo "<p style='color:green;'>SUCCESS: The autoload.php file was found.</p>";
} else {
echo "<p style='color:red;'>FAILURE: The autoload.php file could NOT be found. Check your paths and permissions.</p>";
}
// Test 3: Check open_basedir restriction
echo "<h2>open_basedir Test</h2>";
$open_basedir = ini_get('open_basedir');
if ($open_basedir) {
echo "<p><strong>Warning:</strong> `open_basedir` is enabled: " . $open_basedir . "</p>";
echo "<p>This can prevent PHP from accessing files outside of the specified directories. Make sure your `eunixmac_api` directory is included or accessible.</p>";
} else {
echo "<p style='color:green;'>`open_basedir` is not set. This is good.</p>";
}
echo "<hr>";
// Test 4: Display Full PHP Info
echo "<h2>PHP Info</h2>";
phpinfo();