New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to set session cookie. Maybe you are using HTTP instead of HTTPS #14184
Comments
|
When you see the error, can you try logging in again? This workaround seems to function for me until we get this fixed.
|
|
@ibennetch yes I tried this multiple times it doesn't work for me. |
|
See also https://stackoverflow.com/q/49811804/2385479 for another person with this problem. |
|
Thanks for the link. But I have rechecked all the configuration files and modules they seem to be ok. |
|
@ibennetch In 4.8.0.1 I am only facing this issue in Chrome. FireFox and Edge work fine. |
|
Same error in Firefox 59. In my case issue caused by javascript error which makes tracekit library to query server and rewrite cookies. |
|
I have the same issue. Run http://phpmyadmin/index.php, provide MySQL valid credentials (not root, but with all privileges; and I tried root as well), have the same error message ("Failed to set session cookie. Maybe you are using HTTP instead of HTTPS to access phpMyAdmin."). So, I checked both FireFox 59.0.2 (64-bit) and Chrome 66.0.3359.117 - the error is reproduced in either browser. As for suggested workaround (return in the beginning of the Moreover, I tried manually create a config.inc.php and select other modes of authentication type (e.g. 'http': doesn't work (looks like wrong credentials); 'config': php error: So, this is dead-end for me. Waiting for new release. PS. It may be obvious (not for me), but when I tried to configure the server in the setup, (renamed my |
|
Hi - I discovered exactly the same error when switching to 4.8.0.1 from 4.7.9 . |
|
Thanks to @ntinti #14219 (comment) this is the reason for this error ( Reproduce-- Random IP
UPDATE mysql.db SET host='127.1.2.1' WHERE Db='phpmyadmin';
FLUSH PRIVILEGES;
-- Now phpmyadmin fails on login : HTTP ERROR 500
-- Assuming host was % before
UPDATE mysql.db SET host='%' WHERE Db='phpmyadmin';
FLUSH PRIVILEGES;
-- Now phpmyadmin succeeds on loginStacktrace |
|
This solution is not working for me, however, I want to clarify my situation: I have phpmyadmin 4.7.9 perfectly working, |
|
As stated in #14234 Login via HTTP works if in private mode, but doesn't work in normal session. |
|
Things like login are not tested with this software before a release? Interesting to know! |
|
@ibennetch Can you please update us with any planned fix for this? |
|
@nik6018 Sure, I can make a comment about this. I hope this is fixed for the next release. In fact, I've held back releasing 4.8.1 because of this bug and #14220. I haven't, personally, had time to look in to either of these issues and I can't speak for anyone else on the development team, but it seems everyone else is quite distracted as well. Since this is a severe problem, I have set the target milestone to 4.8.1, which doesn't assure us that it will be fixed for the release of 4.8.1, but it indicates our desire to have this fixed before the next release. We regret that this bug affects you and wish it weren't in a release version. |
|
To address the concern raised by @COLABORATI, yes of course we test the code before release, in fact I use the development version nearly every day and have found many bugs before they were released. I know many of the other developers also use the development version often. In addition, we have a series of automated tests that run before a release is created and after each new code commit is added to the repository; in the case of this bug none of those tests caught the bug. I'm still not able to reproduce it (other than occasionally needing to resubmit my username and password when logging in, which isn't even exactly what is being reported here). So testing such as you propose is performed, but did not catch this particular instance. |
|
I'm in a worse scenario ... if I update to current version I just have fatal errors. I don't understand ... fresh install works, but I can't update even deleting phpmyadmin tables. |
|
I don't think setting the secure option for Based on comments from nik6018 and others, it seems the problem continues even if the cookies are cleared, which really eliminates a lot of the obvious causes that I see. Without having a clear way to reproduce this or seeing a clear cause, it's difficult to pinpoint the problem without spending more time on it directly. Of course, this is a high-priority problem, but I don't have any answer yet. As a workaround, you should be able to edit libraries/common.inc.php and comment out lines 188-196, the if block beginning with |
|
Ive been getting this error since upgrading to 4.8.0 as well but I dont access via http, my install is https only. the message is being triggered when trying to login after a session has expired, opening the login page in a private tab logs in first time. a standard tab errors on first attempt, logs in on the second. |
|
no it logs in first time on private tabs, standard tabs login first time too if I log out and open a new window. its just the expired session triggering this error for me. I just wanted to mention that my install is HTTPS only, everyone commenting so far has mentioned they also login via http. I use Firefox (dev edition) but have tested in chrome (stable) as well in case it was a brwoser niggle. |
|
In my case, I disabled the chrome extension Katalon Recorder (Selenium IDE for Chrome) and it fixed. |
|
When login the first time through HTTPS, a secure cookie is set... The problem is that if an user logout and then attempt to login again through HTTP, that will fails because there is already a secure cookie set that of course cannot be sent through HTTP. Same behavior occurs for a session timeout when an user need login again. Basically, if a secure cookie is set, user will have to login through HTTPS only. There are some browsers allowing setting secure cookies via HTTP protocol but that is a wrong behavior which has been recently deprecated (For instance: FF 52). There are not reliable solution here. Once the secure cookie is set and if an user want login through HTTP, it will have to remove the secure cookie first. The annoying thing is that you cannot unset a secure cookie for a specific domain via HTTP protocol... The only solution I see here is to set specific session name for both HTTP and HTTPS but this could lead to side effects I think. |
|
Thanks to https://chrome.google.com/webstore/detail/chrome-extension-source-v/jifpbeccnghkjeaalbbjmodiffmgedin If someone finds what is wrong faster than me, post it here ;) |
|
I’m pretty sure this has nothing to do with Chrome extension. It’s been awhile since I last use the cookie setting. I’ll test this in the next morning and let you guys know the soonest. This bug was reported since Nginx 1.12 and PHP5 but now it’s already like what? Nginx 1.17 and PHP7 yet the bug is still here. We need a better insect repellent equipment... since I’m on Ubuntu and running 4.9.0.1 with mariadb 10.4 i’ll setup a vm to see if this is still the case, otherwise it’s a windows thing 😂 |
|
@rangka-kacang I would not be so sure, I had the issue with the extension and also without I looked at the the code of the extension and it does very strange things with 'set-cookies' instructions |
|
I've tested this just now and I can't produce it anymore. My environment are as follows (and is a fresh install, no extensions, nothing, just stock iso): I have this on my I have no problem accessing and logging in via localhost. I'm using phpMyAdmin 4.9.0.1 from https://files.phpmyadmin.net/phpMyAdmin/4.9.0.1/phpMyAdmin-4.9.0.1-all-languages.zip and Google Chrome Version 77.0.3865.75 (Official Build) (64-bit) from the official repository |
|
hello, i just started using laragon and i'm getting the error: please could someone walk me through solving this problem? |
|
I am using squid proxy (latest) and phpmyadmin refusing to work on it. |
Signed-off-by: William Desportes <williamdes@wdes.fr>
|
So this issue is now closed in next version, the unfixed (for now) part of this issue is #13172 Please, everybody that can do it: And comment about if it works or not on your setup |
|
And how to apply this patch? |
|
This fix was released as part of phpMyAdmin release 4.9.2. If you are able, please update to that version and let us know in this ticket if you continue to have trouble. |
But the best option is still to update to 4.9.2 |
|
I have just updated to 4.9.2 and it's made no difference. I'm still getting the same error. |
|
Thanks. |
|
With the link https://example.com/phpmyadmin/ everything is ok. |
|
Hello I upgrade phpmyadmin to 4.9.2 then the bug is style here. |
My url is: https://10.17.1.109:8443/index.php |
|
Getting the same error. Tried using Chrome (all extension disabled), IE, Firefox. Tried options of clearing cookies. Nothing in phpmyadmin, php, or apache error logs. No luck. using myPHPAdmin 4.9.2 with PHP Version 7.3.12 and MySQL version 8.0.18 with standard authentication. |
|
For everyone that has the issue using 4.9.2 and higher please post in #15634 |
|
Hey,
Finally work on Chrome
If needed see my config:Env
upstream php-fpm-phpmyadmin{
server admin.slash16.local:9000;
}
server {
listen 8443 ssl;
listen [::]:8443 ssl;
ssl_certificate /phpmyadmin.crt;
ssl_certificate_key /phpmyadmin.key;
server_name _;
root /var/www/phpmyadmin/;
index index.php;
location / {
rewrite ^.*$ /index.php;
}
location ~ \.(?:css|js|jpeg|jpg|gif|png|woff|woff2|ttf)$ {
try_files $uri /$uri =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass php-fpm-phpmyadmin;
}
location ~ /\.ht {
deny all;
}
}
[phpmyadmin]
user = www-data
group = www-data
listen.owner = www-data
listen.group = www-data
listen = 0.0.0.0:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
*/
/**
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = "111111111111111111111111111111111"; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* Servers configuration
*/
/**
* First server
*/
$i = 1;
/* Server parameters */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'db1.slash16.local';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';
/**
* Second server
*/
$i = 2;
/* Server parameters */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'db2.slash16.local';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';
/**
* Third server
*/
$i = 3;
/* Server parameters */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'preprod.slash16.local';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql'; |
Also in my case " Safe torrent scanner " chrome extension caused the login problem. So I disable it . |
|
In my case it was caused by the Firefox extension 'Disable HTML5 Autoplay'. Really weird. |
Steps to reproduce
Expected behaviour
After entering the login information, I should be able to log in
Actual behaviour
It doen't log me in and fails with this error : Failed to set session cookie. Maybe you are using HTTP instead of HTTPS
In previous version of PMA 4.7.9 I didn't face this issue I was able to log in via HTTP and HTTPS without any issue.
Now I am only able to login via HTTPS.
How can I disable this as I cannot find anything in the docs, the closest thing I was able to find is this Link
I am really confused about this.
I checked the file
common.inc.phpwhere this error is mentioned, but still wasn't able to figure out the issue.Web Server configuration
Server configuration
Operating system:
CentOS and Ubuntu
Web server:
Nginx 1.12.2
Database:
MySQL 5.5.59
PHP version:
PHP 5.6.35
phpMyAdmin version:
4.8.0
Client configuration
Browser:
Chrome, FireFox
Operating system:
Windows
The text was updated successfully, but these errors were encountered: