update
This commit is contained in:
@@ -562,13 +562,21 @@
|
||||
}
|
||||
|
||||
async function testPHP() {
|
||||
logDebug('Testing PHP connection...');
|
||||
logDebug('Testing PHP & Webhook...');
|
||||
try {
|
||||
const response = await fetch('scripts/add/test.php');
|
||||
if (response.ok) {
|
||||
const result = await response.json();
|
||||
logDebug(`✓ PHP OK: ${result.message}`);
|
||||
logDebug(`PHP Version: ${result.server_info?.php_version || 'Unknown'}`);
|
||||
logDebug(`PHP: ${result.tests?.php?.version || 'OK'}`);
|
||||
logDebug(`cURL: ${result.tests?.curl?.status || 'unknown'}`);
|
||||
if (result.tests?.webhook) {
|
||||
const wh = result.tests.webhook;
|
||||
if (wh.status === 'ok') {
|
||||
logDebug(`✓ Webhook: HTTP ${wh.http_code}`);
|
||||
} else {
|
||||
logDebug(`✗ Webhook: ${wh.error || 'HTTP ' + wh.http_code}`, true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logDebug(`✗ PHP Error: HTTP ${response.status}`, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user