If phpMyAdmin fails during cookie authentication with Unsupported operand types: int - string, inspect configuration storage for an empty LoginCookieValidity preference. Remove only that invalid key so the valid server default can apply again.
Last updated: November 7, 2026.
SELECT username, config_data
FROM phpmyadmin.pma__userconfig
WHERE JSON_CONTAINS_PATH(
config_data,
'one',
'$.LoginCookieValidity'
);
UPDATE phpmyadmin.pma__userconfig
SET config_data = JSON_REMOVE(config_data, '$.LoginCookieValidity')
WHERE JSON_CONTAINS_PATH(config_data, 'one', '$.LoginCookieValidity');Back up the matching row before running the update. Adjust the schema and table names to your installation. Removing the preference is safer than replacing the entire JSON document or deleting every saved phpMyAdmin setting.
Why the saved preference overrides the default
phpMyAdmin can store user preferences in pma__userconfig when configuration storage and the userconfig table are enabled. The phpMyAdmin configuration reference explains that these database-backed preferences supplement the server configuration.
A current phpMyAdmin 5.2.3 report documents an empty string being saved for LoginCookieValidity. That value overrides the normal positive integer and can make cookie authentication fail before the interface opens. Removing the key allows the configured or built-in value to be used.
Repair narrowly and prevent a repeat
Take a database backup, inspect the affected row, and update only the invalid JSON path. Then set a positive $cfg['LoginCookieValidity'] value in config.inc.php, clear the phpMyAdmin session cookie, and sign in again. Do not store passwords or authentication secrets in the user-preference JSON.
If the login error prevents access to phpMyAdmin, run the repair from the MySQL command-line client or another trusted administration tool using a narrowly privileged account. Confirm the target username before updating it, especially when several administrators share the same configuration-storage database. Keep the exported original row until login and preference saving both work.
If database-backed preferences are unnecessary, the documented userconfig setting can be disabled. Otherwise, update phpMyAdmin to a release where the problem is resolved and test saving preferences with a non-administrator account first. Confirm that the JSON remains valid after reloading the Settings page.
Continue with phpMyAdmin connection settings, checking MySQL configuration before upgrades, and verifying MySQL privileges.