redbrad0 Posted April 29, 2008 Share Posted April 29, 2008 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"); Link to comment https://forums.phpfreaks.com/topic/103453-customize-phpmyadmin-to-use-external-auth/ Share on other sites More sharing options...
redbrad0 Posted April 29, 2008 Author Share Posted April 29, 2008 Looks like I might of found the file to add the code to. Can anyone else verify that I will not miss anything if the code is added to libraries/common.inc.php? Link to comment https://forums.phpfreaks.com/topic/103453-customize-phpmyadmin-to-use-external-auth/#findComment-529759 Share on other sites More sharing options...
redbrad0 Posted April 29, 2008 Author Share Posted April 29, 2008 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(); } Link to comment https://forums.phpfreaks.com/topic/103453-customize-phpmyadmin-to-use-external-auth/#findComment-529773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.