Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9012183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:55:56+00:00 2026-06-16T02:55:56+00:00

PhpMyAdmin sets the cookie path to the path PMA is installed in. So if

  • 0

PhpMyAdmin sets the cookie path to the path PMA is installed in.

  • So if it is installed in /pma/ it will set the cookie path to /pma/.

However, I have logout code which needs to access the session to be able to log the user out of PMA along with other system sessions, but it is located in /.

This of course does not work since the browser will not allow the cookie to be accessed outside of the cookie path.

Setting the default cookie path in php.ini does not work since PMA specifies its own path when setting the cookie which will override the php.ini setting.

Is there a way I can change the default cookie path set by PMA to / by setting a config option or possibly extending a PMA class? I’ve also read about a thing called monkey patching using runkit, can it do that? If so how?

Editing PMA core files is not an option as I want the change to stick between upgrades. If this can be coded into config.inc.php it would stick between upgrades.

Some things I have tried via config.inc.php :

  • setting my own cookie with same name and sessionid, does not work as cookie is overwritten by the one PMA sets further in the PHP processing.
  • Changing the value of $_SERVER[‘PHP_SELF’] which is one of the values used in determining path, does not work, not sure why.
  • I tried to extend the PMA_Config class particularly the getCookiePath() method, did not work as I don’t know how to instantiate it so it overrides the PMA_Config’s method.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:55:57+00:00Added an answer on June 16, 2026 at 2:55 am

    I ended up using the Signon authtype for PMA

    My PMA config then became:

    $cfg['Servers'][$i]['auth_type']     = 'signon';
    $cfg['Servers'][$i]['SignonSession'] = 'YOUR_SESSION_ID'; // You can use ini_get('session_name') if you prefer
    $cfg['Servers'][$i]['SignonURL']     = 'FULL_URL'; // URL it will redirect unauthenticated users
    $cfg['Servers'][$i]['LogoutURL']     = 'FULL_URL'; // URL where user will be redirected after logout
    

    In my SSO script, I added these lines when logging into the rest of the system so it will simultaneously login to PMA as well.

    $_SESSION['PMA_single_signon_user'] = 'MY_PMA_USERNAME';
    $_SESSION['PMA_single_signon_password'] = 'MY_PMA_PASSWORD';
    

    Now I don’t require having to access PMA cookie as it uses the SID cookie set by main system. To logout of main system and PMA I do a regular cookie logout:

    $_SESSION = array();
    setcookie(session_name(), '', time() - 3600);
    session_destroy();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hi had a working phpmyadmin which stopped working when i installed a new version
I don't have phpMyAdmin installed in my web site. Sometimes I was doing some
I use phpmyadmin to create mysql database. And I have set the auth type
I just installed phpmyadmin module from webmin but I can't find any resources which
I generally use phpMyAdmin on a server where it is already installed. However, I
Using PHPMyAdmin in a Ubuntu desktop test server box that I have just installed
I have just installed phpMyAdmin on my new Fedora Core 10 dedicated server. I
In phpMyAdmin I have a char(32) column that has no default value(ie. Default: None).
I am running phpmyadmin and installed apache server on my personal computer. My problem
I have phpMyAdmin running with MAMP, and I am finding it impossible to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.