phpmyadmin Failed to set session cookie. Maybe you are using HTTP instead of HTTPS

后端 未结 16 2000
小鲜肉
小鲜肉 2020-12-05 14:34

I install PHP, Apache, and MySQL done and worked. When I finish installing Phpmyadmin, then open it has an error.

Failed to set session cookie. Maybe you are         


        
16条回答
  •  青春惊慌失措
    2020-12-05 15:06

    I have had this issue in the past however was successful in solving it using the instructions provided in this answer. (using phpMyAdmin version 4.8.0.1)

    Navigate to

    config.inc.php
    

    in your server files and examine the following section:

    /* Authentication type and info */
    $cfg['Servers'][$i]['auth_type'] = 'cookie';
    $cfg['Servers'][$i]['user'] = 'username';
    $cfg['Servers'][$i]['password'] = 'password';
    $cfg['Servers'][$i]['extension'] = 'mysqli';
    $cfg['Servers'][$i]['AllowNoPassword'] = true;
    

    If not already performed, comment out the user and password lines and makes sure the auth_type is set to cookie.

    From my experience, this action needs to take place for phpMyAdmin to operate with cookie authentication before you move on.

    Next perform the following steps to solve the session cookie not working with HTTP:

    1. Enter your browser settings (e.g. for Google Chrome go to chrome://settings/)
    2. Attempt to locate the setting to clear cookies, cached data, images and files, history, etc.
    3. After you successfully find this, clear your browser's browsing history, download history, cached images and files, and content settings.
    4. Clear the cookies for the phpMyAdmin login page. Note: In Internet Explorer, it is slightly difficult to view and delete the cookies. An internet article is available from Ask Leo about viewing cookies in IE if you need help.

    I received the idea of performing the above instructions because I eyed someone at this GitHub issue mentioning private mode. This is a comment from nik6018:

    As stated in #14234 Login via HTTP works if in private mode, but doesn't work in normal session. I tried to clear the cookie for the domain but still the same issue.

    Private mode reminded me of issues I have had in the distant past like this one, and I remember having to clear various browser items.

    On account of my reminder from the distant past, I tried the above instructions in a different sequence or way than I presented them, and it worked.

提交回复
热议问题