![]() 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
// Check Danny song status
require_once 'config/database.php';
echo "<h1>🎵 Danny Song Status Check</h1>";
// Get database connection
$pdo = getDBConnection();
if (!$pdo) {
echo "<p style='color: red;'>❌ Database connection failed!</p>";
exit;
}
// Check for Danny tracks
$stmt = $pdo->prepare("SELECT * FROM music_tracks WHERE prompt LIKE ? ORDER BY created_at DESC");
$stmt->execute(['%danny%']);
$dannyTracks = $stmt->fetchAll();
if (empty($dannyTracks)) {
echo "<p style='color: orange;'>⚠️ No Danny tracks found in database</p>";
} else {
echo "<p style='color: green;'>✅ Found " . count($dannyTracks) . " Danny track(s):</p>";
foreach ($dannyTracks as $track) {
echo "<div style='border: 1px solid #ccc; padding: 15px; margin: 10px 0; border-radius: 5px;'>";
echo "<h3>" . htmlspecialchars($track['title']) . "</h3>";
echo "<p><strong>Task ID:</strong> " . $track['task_id'] . "</p>";
echo "<p><strong>Status:</strong> <span style='color: " . ($track['status'] === 'complete' ? 'green' : ($track['status'] === 'processing' ? 'orange' : 'red')) . ";'>" . $track['status'] . "</span></p>";
echo "<p><strong>Prompt:</strong> " . htmlspecialchars($track['prompt']) . "</p>";
echo "<p><strong>Created:</strong> " . $track['created_at'] . "</p>";
if ($track['audio_url']) {
echo "<p><strong>Audio URL:</strong> <a href='" . htmlspecialchars($track['audio_url']) . "' target='_blank'>" . htmlspecialchars($track['audio_url']) . "</a></p>";
}
if ($track['status'] === 'processing') {
echo "<p style='color: orange;'>⏳ Still processing... This usually takes 2-3 minutes</p>";
} elseif ($track['status'] === 'complete') {
echo "<p style='color: green;'>✅ Complete! Your Danny song is ready!</p>";
} elseif ($track['status'] === 'failed') {
echo "<p style='color: red;'>❌ Failed to generate</p>";
}
echo "</div>";
}
}
// Check processing tracks
echo "<h2>🔄 All Processing Tracks:</h2>";
$stmt = $pdo->prepare("SELECT * FROM music_tracks WHERE status = 'processing' ORDER BY created_at DESC");
$stmt->execute();
$processingTracks = $stmt->fetchAll();
if (empty($processingTracks)) {
echo "<p style='color: green;'>✅ No tracks currently processing</p>";
} else {
echo "<p style='color: orange;'>⚠️ Found " . count($processingTracks) . " processing track(s):</p>";
foreach ($processingTracks as $track) {
echo "<p><strong>" . htmlspecialchars($track['title']) . "</strong> - Task ID: " . $track['task_id'] . " - Created: " . $track['created_at'] . "</p>";
}
}
// Check recent callbacks
echo "<h2>📞 Recent Callbacks:</h2>";
$logFile = 'callback_log.txt';
if (file_exists($logFile)) {
$logContent = file_get_contents($logFile);
$lines = explode("\n", $logContent);
$recentLines = array_slice($lines, -10); // Last 10 lines
echo "<pre style='background: #f0f0f0; padding: 10px; max-height: 200px; overflow-y: auto; font-size: 12px;'>";
foreach ($recentLines as $line) {
if (trim($line)) {
echo htmlspecialchars($line) . "\n";
}
}
echo "</pre>";
} else {
echo "<p>No callback log found</p>";
}
echo "<h2>🔧 Quick Actions:</h2>";
echo "<p><a href='/library.php' style='background: #667eea; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 5px; margin-right: 1rem;'>📚 Go to Library</a>";
echo "<a href='/create.php' style='background: #48bb78; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 5px; margin-right: 1rem;'>🎵 Create New Music</a>";
echo "<button onclick='location.reload()' style='background: #f39c12; color: white; padding: 0.5rem 1rem; border: none; border-radius: 5px; margin-right: 1rem; cursor: pointer;'>🔄 Refresh Status</button>";
echo "<a href='/dashboard.php' style='background: #764ba2; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 5px;'>🏠 Back to Dashboard</a></p>";
echo "<script>";
echo "setTimeout(function() { location.reload(); }, 30000);"; // Auto-refresh every 30 seconds
echo "</script>";
?>