0

When phpMyAdmin tries to access URL as https://example.com/phpmyadmin/server_variables.php&filter=long_query_time, Apache throws a 404 Error.

What might be the problem?

The requested URL /phpmyadmin/server_variables.php&filter=long_query_time was not found on this server.
 Apache/2.4.27 (Ubuntu) Server at example.com Port 443

When I changed & to ?, everything worked like a charm. My phpmyadmin.conf looks like this:

Alias /phpmyadmin "/usr/share/phpmyadmin"
<Directory "/usr/share/phpmyadmin">
    DirectoryIndex index.php
    AllowOverride All
    Options FollowSymlinks
    Require all granted
</Directory>

.htaccess in /usr/share/phpmyadmin looks like this:

AuthType Basic
AuthName "Restricted access!"
AuthUserFile /usr/share/phpmyadmin/.htpasswd
Require valid-user

phpMyAdmin version is: 4.7.3

devondre
  • 103
  • 6

2 Answers2

3

This is completely normal, because a URL has these components with exactly these delimiters:

scheme://host:port/path?query

This means that the following URLs are completely different:

  • https://example.com/phpmyadmin/server_variables.php?filter=long_query_time

    Here, phpmyadmin/server_variables.php is path and filter=long_query_time query. Apache can find server_variables.php and pass the variables of this GET method query to PHP.

  • https://example.com/phpmyadmin/server_variables.php&filter=long_query_time

    This one has only path, phpmyadmin/server_variables.php&filter=long_query_time. Because there's no such file, Apache shows error 404, as it is supposed to do.

The & is, instead, used as a delimiter between variables inside a query, e.g. ?foo=123&bar=456.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
0

This was a bug. Fixed today by https://github.com/nijel

https://github.com/phpmyadmin/phpmyadmin/issues/13561

devondre
  • 103
  • 6