![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/private_html/utils/ |
<?php
require_once 'config/database.php';
$pdo = getDBConnection();
echo "<h2>Current Database Status</h2>";
// Get all tracks with their current status
$stmt = $pdo->query("
SELECT id, user_id, task_id, title, status, audio_url, created_at
FROM music_tracks
ORDER BY created_at DESC
");
$tracks = $stmt->fetchAll();
echo "<table border='1' style='border-collapse: collapse; width: 100%;'>";
echo "<tr><th>ID</th><th>User</th><th>Title</th><th>Status</th><th>Audio URL</th><th>Created</th></tr>";
foreach ($tracks as $track) {
$status_color = '';
switch ($track['status']) {
case 'complete':
$status_color = 'green';
break;
case 'failed':
$status_color = 'red';
break;
case 'processing':
$status_color = 'orange';
break;
}
echo "<tr>";
echo "<td>" . $track['id'] . "</td>";
echo "<td>" . $track['user_id'] . "</td>";
echo "<td>" . htmlspecialchars($track['title']) . "</td>";
echo "<td style='color: $status_color;'>" . $track['status'] . "</td>";
echo "<td>" . ($track['audio_url'] ? 'Yes' : 'No') . "</td>";
echo "<td>" . $track['created_at'] . "</td>";
echo "</tr>";
}
echo "</table>";
// Summary
$complete_count = 0;
$processing_count = 0;
$failed_count = 0;
foreach ($tracks as $track) {
switch ($track['status']) {
case 'complete':
$complete_count++;
break;
case 'processing':
$processing_count++;
break;
case 'failed':
$failed_count++;
break;
}
}
echo "<h3>Summary</h3>";
echo "<p>Total Tracks: " . count($tracks) . "</p>";
echo "<p>Complete: $complete_count</p>";
echo "<p>Processing: $processing_count</p>";
echo "<p>Failed: $failed_count</p>";
// Check specific tracks
echo "<h3>Checking Specific Tracks</h3>";
$specific_tracks = ['fun fun', 'dom', 'happy'];
foreach ($specific_tracks as $title) {
$stmt = $pdo->prepare("SELECT * FROM music_tracks WHERE title LIKE ? ORDER BY created_at DESC LIMIT 1");
$stmt->execute(["%$title%"]);
$track = $stmt->fetch();
if ($track) {
echo "<p><strong>$title</strong>: ID " . $track['id'] . " - Status: " . $track['status'] . " - Audio: " . ($track['audio_url'] ? 'Yes' : 'No') . "</p>";
} else {
echo "<p><strong>$title</strong>: Not found</p>";
}
}
?>