<?php
require_once __DIR__ . '/../config/database.php';

try {
    $db = getDB();
    $stmt = $db->query('SELECT photo FROM researcher_profiles WHERE photo IS NOT NULL LIMIT 3');
    $photos = $stmt->fetchAll(PDO::FETCH_COLUMN);
    foreach ($photos as $photo) {
        echo 'Photo path: ' . $photo . "\n";
        echo 'UPLOADS_URL: ' . UPLOADS_URL . "\n";
        echo 'Current URL: ' . UPLOADS_URL . '/' . $photo . "\n";
        echo 'Correct URL: ' . SITE_URL . '/' . $photo . "\n";
        echo '---' . "\n";
    }
} catch (Exception $e) {
    echo 'Error: ' . $e->getMessage() . "\n";
}
?>