phpMyAdmin says it cannot start a session
Cannot start session without errorsShort answer
phpMyAdmin keeps your login in a PHP session. If PHP cannot create or keep that session, you get this message or a login loop. Read the PHP error log first, then check three things: the session.save_path folder exists and is writable, session.cookie_secure matches how you open the site, and the URL phpMyAdmin thinks it has.
Fix it fast
1Find out which cause you have
Ask PHP where it stores sessions, then read the web server's PHP error log for the line that names the real failure.
php -i | grep -E '^session\.(save_path|cookie_secure)' sudo tail -n 30 /var/log/apache2/error.log2Match what you see, then jump to its fix
- 1
The error log shows a failure writing or opening a file under the session.save_path folderThe session folder is missing or PHP cannot write to itFix - 2
Login works on https:// but loops or fails on http://, and session.cookie_secure is 1Secure cookies are required but you open the site over HTTPFix - 3
The page loads, you log in, and you are sent back to the login page or see Missing parameters; the site sits behind a reverse proxyphpMyAdmin has the wrong idea of its own URL (proxy or HTTPS offload)Fix
- 1
What does the error look like?
Cannot start session without errorsMissing parameters
Cause 1 of 3
The session folder is missing or PHP cannot write to it
1Check
session.save_path is the folder where the default files handler creates session files. phpMyAdmin's FAQ lists a missing or unwritable folder as a cause of the 'Missing parameters' error. The PHP process must be able to write there.
php -i | grep '^session.save_path'
ls -ld /var/lib/php/sessions
ps -o user= -C apache2 | sort -u2Fix
Create the folder if it is missing and give it to the user that runs PHP. Use the path your own session.save_path shows; the example is a common Debian and Ubuntu path.
sudo mkdir -p /var/lib/php/sessions
sudo chown www-data: /var/lib/php/sessions3Verify
Reload the web server, open phpMyAdmin again and check that a session file appears.
sudo systemctl reload apache2
ls -l /var/lib/php/sessions | tail -n 3Confirmed by docs.phpmyadmin.net
Cause 2 of 3
Secure cookies are required but you open the site over HTTP
1Check
With session.cookie_secure on, sessions only work over HTTPS. If you reach phpMyAdmin over plain HTTP, for example on an internal address, the cookie is never sent back.
php -i | grep '^session.cookie_secure'2Fix
Open phpMyAdmin through HTTPS. Only if the server is not reachable from outside and you accept the trade-off, turn the setting off for that PHP pool.
; php.ini or pool config
session.cookie_secure = 1 ; keep on, and use https://3Verify
Log in through the https:// address.
curl -sI https://example.com/phpmyadmin/ | head -n 5Confirmed by php.net
Cause 3 of 3
phpMyAdmin has the wrong idea of its own URL (proxy or HTTPS offload)
1Check
phpMyAdmin's FAQ says repeated login prompts and Missing parameters can come from the $cfg['PmaAbsoluteUri'] setting not matching the URL users type. It also says a reverse proxy in front of Apache must rewrite Set-Cookie headers.
grep -n 'PmaAbsoluteUri' /etc/phpmyadmin/config.inc.php /var/www/html/phpmyadmin/config.inc.php2Fix
Set PmaAbsoluteUri to the exact public address, and for an Apache reverse proxy add the cookie rewrite directives for domain and path.
// config.inc.php
$cfg['PmaAbsoluteUri'] = 'https://example.com/phpmyadmin/';
# Apache reverse proxy
ProxyPassReverseCookieDomain internal.example.local example.com
ProxyPassReverseCookiePath / /phpmyadmin/3Verify
Log in again, then confirm that the browser stores a cookie for example.com.
sudo apachectl configtest && sudo systemctl reload apache2Confirmed by docs.phpmyadmin.net
How do I stop it coming back?
- After a PHP upgrade, check that session.save_path still exists and is owned correctly.
- Use one public URL for phpMyAdmin and set it explicitly when a proxy is in the path.
- Keep session.cookie_secure on and serve every admin tool over HTTPS.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Back end
Apache returns 503 or 504 because PHP-FPM did not answer in time
Error dispatching request
Apache sent the request to PHP-FPM and gave up waiting.
3 causes, each with a fixBack end
AWS SDK for PHP cannot get credentials from the instance profile metadata server
Error retrieving credentials from the instance profile metadata server.
The SDK tries the EC2 instance metadata service when it has no valid credentials from anywhere earlier in its chain.
4 causes, each with a fixBack end
AWS SDK for PHP rejects requests: the signature is from the future
Signature not yet current: {date} is still later than {date}
AWS compares the timestamp in your signed request with its own clock.
2 causes, each with a fixBack end
CodeIgniter 4 cannot write its cache files
CodeIgniter\Cache\Exceptions\CacheException: Cache unable to write to /var/www/app/writable/cache/
CodeIgniter 4's file cache needs a cache directory that the web server can really write to.
2 causes, each with a fixBack end
CodeIgniter 3 loads the model but the property is undefined
The model name you are loading is the name of a resource that is already being used: user
CodeIgniter 3 expects a model file named like its class, with the first letter capitalised, for example User_model.php holding class User_model.
2 causes, each with a fixBack end
CodeIgniter 3 stops with "Your system folder path does not appear to be set correctly"
503 Service Unavailable
CodeIgniter 3's front controller resolves $system_path and then checks that the result is a directory.
3 causes, each with a fix