Modifications to /etc/phpmyadmin/config.inc.php have not taken effect
P粉529581199
P粉529581199 2024-01-16 11:53:14
0
1
367

I want to configure PhpMyAdmin to access only one database with one user.

I have previously tried to restrict access via .htaccess using this answer from 2013 with no success:

phpMyAdmin blocks access to a single database

So I tried adding deny, allow rules as mentioned in this answer:

How to restrict access to a specific database user account in phpMyAdmin?

But it doesn't work either. I continue to access all users. I've read the documentation and rewritten the lines in config.inc.php to

$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array(
'deny root from all',
'deny user1 from all',
'deny user2 from all',
'allow user3 from all',
);

Where user1 and user2 are the users to be denied, and user2 is the user to be allowed. But I still have access with all users. So I just tried

$cfg['Server'][$i]['AllowDeny']['order'] = 'Explicit';

This should block access for all users, but I still have access to all users. So I believe /etc/phpmyadmin/config.inc.php is being overwritten somehow since no changes are taking effect, but I don't understand how.

Know where to check?

P粉529581199
P粉529581199

reply all(1)
P粉877719694

In my case, it was solved by updating PHP and PhpMyAdmin to the latest version. Poof, the problem is gone

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!