'localhost', 'username' => 'prestashop', 'password' => 'prestashop', 'database' => 'prestashop', 'prefix' => 'ps_' ]; echo "Attempting direct database connection...\n"; try { $db = new PDO("mysql:host={$dbConfig['host']};dbname={$dbConfig['database']}", $dbConfig['username'], $dbConfig['password']); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $stmt = $db->prepare("SELECT value FROM {$dbConfig['prefix']}configuration WHERE name = 'ECOMZONE_API_TOKEN'"); $stmt->execute(); $result = $stmt->fetch(PDO::FETCH_ASSOC); if ($result && isset($result['value'])) { echo "API Token found in database: " . $result['value'] . "\n"; } else { echo "API Token not found in database.\n"; } } catch (PDOException $e) { echo "Database connection failed: " . $e->getMessage() . "\n"; echo "You'll need to manually update the api_test.php file with your API token.\n"; }