I'm trying to reinstall my server and have run into a new problem that I can't seem to figure out.

I'm running a LAMP setup and host a few sites for my friends, for that I have open_basedir set in their Apache conf files but that suddenly affect phpMyAdmin (Warning: Unknown: open_basedir restriction in effect. File(/usr/share/phpmyadmin/index.php) is not within the allowed path)

It works fine if I remove the open_basedir from the virtual host.

What really confuses me is that this has never been an issue in any of my previous setups, has something changed or am I doing something wrong this time?

php 7.0.4

  • How was defined the open_basedir when there is the error ? You should have /usr/share/phpmyadmin in it to solve your problem. – Dom May 15 '16 at 8:59
  • That has never before been necessary on the specific virtual hosts. And it is set in /etc/phpmyadmin/apache.conf which is included in /etc/apache2/apache2.conf – Zlug May 15 '16 at 9:02

Turns out the problem was that phpMyAdmin wasn't set up to php7 So all I had to do was change

<IfModule mod_php.c>


<IfModule mod_php7.c>

in /etc/phpmyadmin/apache.conf

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.