![]() 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/ |
<?php
require_once 'config/database.php';
$pdo = getDBConnection();
if (!$pdo) {
die("Database connection failed");
}
// Simulate the same logic as artist_profile_clean.php
$artist_id = isset($_GET['id']) ? (int)$_GET['id'] : 67; // Default to 67 for testing
echo "<h2>Debug Artist Profile - ID: $artist_id</h2>";
// Check if user exists
$stmt = $pdo->prepare("SELECT id, name, email FROM users WHERE id = ?");
$stmt->execute([$artist_id]);
$user = $stmt->fetch();
if (!$user) {
echo "<p style='color: red;'><strong>ERROR:</strong> User ID $artist_id does not exist!</p>";
echo "<p>This explains why you're seeing '$artist_id' instead of a name.</p>";
// Show available users
echo "<h3>Available Users:</h3>";
$stmt = $pdo->query("SELECT id, name, email FROM users ORDER BY id LIMIT 20");
$users = $stmt->fetchAll();
echo "<table border='1' style='border-collapse: collapse;'>";
echo "<tr><th>ID</th><th>Name</th><th>Email</th></tr>";
foreach ($users as $u) {
echo "<tr>";
echo "<td>" . $u['id'] . "</td>";
echo "<td>" . $u['name'] . "</td>";
echo "<td>" . $u['email'] . "</td>";
echo "</tr>";
}
echo "</table>";
echo "<p><strong>Solution:</strong> Use a valid user ID from the list above.</p>";
exit;
}
echo "<p style='color: green;'><strong>User found:</strong> " . $user['name'] . "</p>";
// Check if user has tracks
$stmt = $pdo->prepare("SELECT COUNT(*) as track_count FROM music_tracks WHERE user_id = ? AND status = 'complete'");
$stmt->execute([$artist_id]);
$track_count = $stmt->fetch()['track_count'];
echo "<p><strong>Tracks:</strong> $track_count</p>";
// Check if user has profile data
$stmt = $pdo->prepare("SELECT * FROM user_profiles WHERE user_id = ?");
$stmt->execute([$artist_id]);
$profile = $stmt->fetch();
if ($profile) {
echo "<p style='color: green;'><strong>Profile found:</strong> Yes</p>";
} else {
echo "<p style='color: orange;'><strong>Profile:</strong> No profile data</p>";
}
echo "<hr>";
echo "<p><strong>Test URLs:</strong></p>";
echo "<ul>";
echo "<li><a href='artist_profile_clean.php?id=1'>artist_profile_clean.php?id=1</a> (Test User)</li>";
echo "<li><a href='artist_profile_clean.php?id=5'>artist_profile_clean.php?id=5</a> (Stephane Bergeron)</li>";
echo "<li><a href='artist_profile_clean.php?id=10'>artist_profile_clean.php?id=10</a> (D'om Ahum)</li>";
echo "</ul>";
?>