T.ME/BIBIL_0DAY
CasperSecurity


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/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/private_html/check_actual_data.php
<?php
require_once 'config/database.php';

echo "<h1>🔍 Checking Actual Track Data</h1>";

try {
    $pdo = getDBConnection();
    
    // Check what columns actually exist
    $stmt = $pdo->query("DESCRIBE music_tracks");
    $columns = $stmt->fetchAll(PDO::FETCH_COLUMN);
    
    echo "<h2>📋 Available Columns</h2>";
    echo "<p><strong>Total columns:</strong> " . count($columns) . "</p>";
    echo "<div style='background: #f0f0f0; padding: 15px; border-radius: 8px; margin: 10px 0;'>";
    echo "<strong>Columns:</strong> " . implode(', ', $columns);
    echo "</div>";
    
    // Check tracks with task_ids
    $stmt = $pdo->prepare("
        SELECT id, title, task_id, status, lyrics, metadata, audio_quality, generation_parameters, processing_info, cost_info, waveform_data, spectrum_analysis, audio_segments
        FROM music_tracks 
        WHERE task_id IS NOT NULL 
        ORDER BY created_at DESC 
        LIMIT 5
    ");
    $stmt->execute();
    $tracks = $stmt->fetchAll();
    
    if (empty($tracks)) {
        echo "<p>❌ No tracks found with task IDs</p>";
        exit;
    }
    
    echo "<h2>📊 Sample Tracks Data</h2>";
    
    foreach ($tracks as $track) {
        echo "<div style='border: 1px solid #ccc; border-radius: 8px; padding: 15px; margin: 15px 0; background: #f9f9f9;'>";
        echo "<h3>🎵 Track ID: {$track['id']} - {$track['title']}</h3>";
        echo "<p><strong>Task ID:</strong> {$track['task_id']}</p>";
        echo "<p><strong>Status:</strong> {$track['status']}</p>";
        
        // Check lyrics
        if (!empty($track['lyrics'])) {
            echo "<p style='color: green;'>✅ <strong>Lyrics:</strong> " . strlen($track['lyrics']) . " characters</p>";
            echo "<div style='background: #e8f5e8; padding: 10px; border-radius: 5px; margin: 5px 0;'>";
            echo "<strong>Preview:</strong> " . htmlspecialchars(substr($track['lyrics'], 0, 100)) . "...";
            echo "</div>";
        } else {
            echo "<p style='color: red;'>❌ <strong>Lyrics:</strong> NULL or empty</p>";
        }
        
        // Check metadata
        if (!empty($track['metadata'])) {
            $metadata = json_decode($track['metadata'], true);
            if ($metadata) {
                echo "<p style='color: blue;'>📊 <strong>Metadata:</strong> " . count($metadata) . " fields</p>";
                echo "<ul>";
                foreach ($metadata as $key => $value) {
                    if (is_string($value)) {
                        echo "<li><strong>$key:</strong> " . htmlspecialchars(substr($value, 0, 50)) . "...</li>";
                    } else {
                        echo "<li><strong>$key:</strong> " . json_encode($value) . "</li>";
                    }
                }
                echo "</ul>";
            }
        } else {
            echo "<p style='color: gray;'>📊 <strong>Metadata:</strong> NULL or empty</p>";
        }
        
        // Check other enhanced fields
        $enhanced_fields = ['audio_quality', 'generation_parameters', 'processing_info', 'cost_info', 'waveform_data', 'spectrum_analysis', 'audio_segments'];
        
        foreach ($enhanced_fields as $field) {
            if (!empty($track[$field])) {
                $data = json_decode($track[$field], true);
                if ($data) {
                    echo "<p style='color: green;'>✅ <strong>$field:</strong> " . count($data) . " fields</p>";
                } else {
                    echo "<p style='color: orange;'>⚠️ <strong>$field:</strong> Invalid JSON</p>";
                }
            } else {
                echo "<p style='color: gray;'>❌ <strong>$field:</strong> NULL or empty</p>";
            }
        }
        
        echo "</div>";
    }
    
    // Check if any tracks have lyrics
    $stmt = $pdo->prepare("SELECT COUNT(*) as total FROM music_tracks WHERE lyrics IS NOT NULL AND lyrics != ''");
    $stmt->execute();
    $result = $stmt->fetch();
    $tracks_with_lyrics = $result['total'];
    
    $stmt = $pdo->prepare("SELECT COUNT(*) as total FROM music_tracks");
    $stmt->execute();
    $result = $stmt->fetch();
    $total_tracks = $result['total'];
    
    echo "<h2>📈 Lyrics Statistics</h2>";
    echo "<p><strong>Total tracks:</strong> $total_tracks</p>";
    echo "<p><strong>Tracks with lyrics:</strong> $tracks_with_lyrics</p>";
    echo "<p><strong>Tracks without lyrics:</strong> " . ($total_tracks - $tracks_with_lyrics) . "</p>";
    
    if ($tracks_with_lyrics > 0) {
        echo "<p style='color: green;'>✅ You DO have tracks with lyrics in the database!</p>";
        echo "<p>The issue might be in the display logic, not the data storage.</p>";
    } else {
        echo "<p style='color: red;'>❌ NO tracks have lyrics stored in the database.</p>";
        echo "<p>This means the callback system isn't storing lyrics properly.</p>";
    }
    
} catch (Exception $e) {
    echo "<p style='color: red;'>❌ Error: " . htmlspecialchars($e->getMessage()) . "</p>";
}

echo "<hr>";
echo "<h2>🎯 Next Steps</h2>";
echo "<p>1. <strong>If tracks have lyrics:</strong> The issue is in track.php display logic</p>";
echo "<p>2. <strong>If no lyrics:</strong> The callback system isn't storing lyrics</p>";
echo "<p>3. <strong>Check callback.php:</strong> See if lyrics extraction is working</p>";
echo "<p><a href='track.php?id=63'>← Test Track 63 Display</a></p>";
?>

CasperSecurity Mini