phpMyAdmin ignores PmaAbsoluteUri

Had a problem when phpMyAdmin was redirecting to the non-secure version of the URL.

Setting PmaAbsoluteUri seemed like the solution (rather than using the auto-detection, I specify it!), but it oddly didn’t work.

Turns out, phpMyAdmin doesn’t trust your settings, and tries to “fix” them for you. As some have pointed out, this is rather odd design.

From the phpMyAdmin source:

            // The URI is specified, however users do often specify this
            // wrongly, so we try to fix this.

(Lesson: if a user specifies the URI – use it! If it doesn’t work, they will fix it.)

The fix is this, in libraries/Config.class.php, function checkPmaAbsoluteUri(), put a return statement on the first line (to stop this method messing with your PmaAbsoluteUri setting.

I encountered this problem in 2.11.11, which is the latest version of the 2.11 branch (which I am forced to use due to my PHP version).

Leave a Reply

Your email address will not be published. Required fields are marked *