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/utils/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/gositeme/domains/soundstudiopro.com/private_html/utils/debug_library.php
<?php
session_start();
require_once 'config/database.php';

// Check if user is logged in
if (!isset($_SESSION['user_id'])) {
    echo "Not logged in";
    exit;
}

echo "<h1>Debug Library for User: " . $_SESSION['user_name'] . "</h1>";
echo "<p>User ID: " . $_SESSION['user_id'] . "</p>";

// Get all music tracks for this user
$tracks = getUserMusicTracks($_SESSION['user_id'], 100);

echo "<h2>Music Tracks in Database (" . count($tracks) . " found)</h2>";

if (empty($tracks)) {
    echo "<p style='color: orange;'>No tracks found in database</p>";
} else {
    echo "<table border='1' style='border-collapse: collapse; width: 100%;'>";
    echo "<tr><th>ID</th><th>Task ID</th><th>Title</th><th>Prompt</th><th>Status</th><th>Created</th><th>Audio URL</th></tr>";
    
    foreach ($tracks as $track) {
        echo "<tr>";
        echo "<td>" . $track['id'] . "</td>";
        echo "<td>" . htmlspecialchars($track['task_id']) . "</td>";
        echo "<td>" . htmlspecialchars($track['title']) . "</td>";
        echo "<td>" . htmlspecialchars(substr($track['prompt'], 0, 50)) . "...</td>";
        echo "<td>" . $track['status'] . "</td>";
        echo "<td>" . $track['created_at'] . "</td>";
        echo "<td>" . ($track['audio_url'] ? 'Yes' : 'No') . "</td>";
        echo "</tr>";
    }
    echo "</table>";
}

// Check if there are any tracks with "danny" in the prompt
echo "<h2>Tracks with 'danny' in prompt</h2>";
$pdo = getDBConnection();
if ($pdo) {
    $stmt = $pdo->prepare("
        SELECT * FROM music_tracks 
        WHERE user_id = ? AND prompt LIKE ? 
        ORDER BY created_at DESC
    ");
    $stmt->execute([$_SESSION['user_id'], '%danny%']);
    $dannyTracks = $stmt->fetchAll();
    
    if (empty($dannyTracks)) {
        echo "<p style='color: orange;'>No tracks found with 'danny' in the prompt</p>";
    } else {
        echo "<p style='color: green;'>Found " . count($dannyTracks) . " tracks with 'danny':</p>";
        echo "<ul>";
        foreach ($dannyTracks as $track) {
            echo "<li>" . htmlspecialchars($track['title']) . " - " . $track['status'] . " (" . $track['created_at'] . ")</li>";
        }
        echo "</ul>";
    }
}

// Check recent API calls
echo "<h2>Recent API Activity</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: 300px; overflow-y: auto;'>";
    foreach ($recentLines as $line) {
        if (trim($line)) {
            echo htmlspecialchars($line) . "\n";
        }
    }
    echo "</pre>";
} else {
    echo "<p>No callback log found</p>";
}

echo "<p><a href='/library.php'>Back to Library</a></p>";
?> 

CasperSecurity Mini