Jump to content

Customize PHPMyAdmin to use external auth


redbrad0

Recommended Posts

I am trying to customize access to phpmyadmin using the same files that are used thru my site. To do this I just need to include a inc_config.php file for my site and then I can check to make sure the user has rights to view this page. What file would I need to add this code into so its called on all pages?

 

include '../../../inc_config.php';

 

if (!$auth->checkRight(MANAGER_ADMINISTRATION_DB_ADMIN))

CallError('AUTH_MANAGER_NORIGHT', 'ERROR_AUTH', "You do not have access to this area");

Sorry I spoke way to soon without further testing. It was running the script and telling me I did not have access to the page but as soon as I gave myself permissions and the rest of the page loaded, I got the following error message

 

Fatal error: Unknown(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition pma_theme_manager of the object you are trying to operate on was loaded _before_ the session was started in libraries/common.inc.php on line 617

 

Line 617 is

$_SESSION['PMA_Theme_Manager']->checkConfig();

 

The area where 617 is located is

/******************************************************************************/

/* setup themes                                          LABEL_theme_setup    */

 

/**

* @global PMA_Theme_Manager $_SESSION['PMA_Theme_Manager']

*/

if (! isset($_SESSION['PMA_Theme_Manager'])) {

    $_SESSION['PMA_Theme_Manager'] = new PMA_Theme_Manager;

} else {

    /**

    * @todo move all __wakeup() functionality into session.inc.php

    */

    $_SESSION['PMA_Theme_Manager']->checkConfig();

}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.