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_track.php
<?php
// Debug script to check track information
session_start();

// Enable error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);

echo "šŸ” DEBUGGING TRACK: 8cd1c23483097cc26fac73049ea0302d\n\n";

// Include database configuration
require_once 'config/database.php';

$pdo = getDBConnection();
if (!$pdo) {
    echo "āŒ Database connection failed\n";
    exit;
}

$taskId = '8cd1c23483097cc26fac73049ea0302d';

// Check if track exists
$stmt = $pdo->prepare("SELECT * FROM music_tracks WHERE task_id = ?");
$stmt->execute([$taskId]);
$track = $stmt->fetch();

if (!$track) {
    echo "āŒ Track not found in database\n";
    echo "Task ID: " . $taskId . "\n";
    
    // Show all tracks for debugging
    echo "\nšŸ“‹ ALL TRACKS IN DATABASE:\n";
    $stmt = $pdo->prepare("SELECT task_id, title, status, audio_url FROM music_tracks ORDER BY created_at DESC LIMIT 10");
    $stmt->execute();
    $tracks = $stmt->fetchAll();
    
    foreach ($tracks as $t) {
        echo "Task ID: " . $t['task_id'] . "\n";
        echo "Title: " . $t['title'] . "\n";
        echo "Status: " . $t['status'] . "\n";
        echo "Audio URL: " . $t['audio_url'] . "\n";
        echo "---\n";
    }
    exit;
}

echo "āœ… Track found in database:\n";
echo "ID: " . $track['id'] . "\n";
echo "Task ID: " . $track['task_id'] . "\n";
echo "Title: " . $track['title'] . "\n";
echo "Status: " . $track['status'] . "\n";
echo "Audio URL: " . $track['audio_url'] . "\n";
echo "User ID: " . $track['user_id'] . "\n";
echo "Created: " . $track['created_at'] . "\n\n";

// Check if user is logged in
if (isset($_SESSION['user_id'])) {
    echo "šŸ‘¤ Current user ID: " . $_SESSION['user_id'] . "\n";
    echo "Track user ID: " . $track['user_id'] . "\n";
    
    if ($_SESSION['user_id'] == $track['user_id']) {
        echo "āœ… User owns this track\n";
    } else {
        echo "āŒ User does not own this track\n";
    }
} else {
    echo "āŒ No user logged in\n";
}

// Check if audio URL is accessible
$audioUrl = $track['audio_url'];
echo "\nšŸ”— AUDIO URL ANALYSIS:\n";
echo "URL: " . $audioUrl . "\n";

if (empty($audioUrl)) {
    echo "āŒ Audio URL is empty\n";
} else {
    // Check if it's a local file
    if (strpos($audioUrl, '/audio_files/') === 0) {
        $localPath = '.' . $audioUrl;
        echo "Local path: " . $localPath . "\n";
        
        if (file_exists($localPath)) {
            echo "āœ… Local file exists\n";
            echo "File size: " . filesize($localPath) . " bytes\n";
            echo "File type: " . mime_content_type($localPath) . "\n";
        } else {
            echo "āŒ Local file does not exist\n";
        }
    }
    
    // Check if it's an external URL
    if (strpos($audioUrl, 'http') === 0) {
        echo "🌐 External URL detected\n";
        
        // Test URL accessibility
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $audioUrl);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36');
        
        $response = curl_exec($ch);
        $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
        $curlError = curl_error($ch);
        curl_close($ch);
        
        echo "HTTP Code: " . $httpCode . "\n";
        if ($curlError) {
            echo "āŒ cURL Error: " . $curlError . "\n";
        } else {
            if ($httpCode == 200) {
                echo "āœ… URL is accessible\n";
                echo "Response size: " . strlen($response) . " bytes\n";
            } else {
                echo "āŒ URL returned HTTP " . $httpCode . "\n";
            }
        }
    }
}

echo "\nšŸ”§ POSSIBLE ISSUES:\n";
echo "1. Track status is not 'complete'\n";
echo "2. User doesn't own the track\n";
echo "3. Audio URL is empty or invalid\n";
echo "4. External URL is not accessible\n";
echo "5. Local file doesn't exist\n";

echo "\nšŸ’” SUGGESTED FIXES:\n";
echo "1. Check if track status is 'complete'\n";
echo "2. Verify user ownership\n";
echo "3. Update audio URL if needed\n";
echo "4. Test external URL accessibility\n";
echo "5. Ensure local files exist\n";
?> 

CasperSecurity Mini