Skip to content

Commit 18fa3cb

Browse files
committed
Update system-diagnostics.md
1 parent 6211ced commit 18fa3cb

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

docs/abcd-administration/system-diagnostics.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,33 @@ The tool scans the `bases.dat` registry and then physically inspects every datab
4848

4949
:::tip Troubleshooting
5050
If a database appears in the main menu selection but gives an error (e.g., "breaks") when you try to open it, check this report first. It acts as a "sanity check" to ensure the operating system can actually see and touch the database files.
51-
:::
51+
:::
52+
53+
54+
## 3. Log Viewer
55+
56+
ABCD features a PHP error log viewer that allows for easy system debugging via the interface. The main purpose is to inform the system administrator of what is happening without the need to access the server directly.
57+
58+
### How to access
59+
To access the log viewer, click on ‘ABCD Configuration’ -> ‘PHP Error Log’
60+
61+
### Enabling the log viewer
62+
To make the Log Viewer functional, you must explicitly define the log path in your main `config.php`. The system expects logs to be written to `bases/log/`.
63+
64+
Add the following block to your `config.php`:
65+
66+
```php
67+
// Sets the path to ABCD's own log folder.
68+
$log_folder = $db_path . "log/";
69+
70+
if (!is_dir($log_folder)) {
71+
mkdir($log_folder, 0777, true);
72+
}
73+
74+
$php_error_log = $log_folder . "php_error.log";
75+
76+
// Forces PHP to log errors to this specific file
77+
ini_set('log_errors', 1);
78+
ini_set('error_log', $php_error_log);
79+
80+
```

0 commit comments

Comments
 (0)