During the few days, I've encountered a problem for operating PHPMyadmin at my workstation. It is very strange situation while clicking the viewing button in PHPMyadmin. Whenever I click the viewing button, the result is always the shown message with "query was empty" in PHPMyAdmin.
I've searched for the solutions in many pages, but there are no satisfied solutions.
But I am aware of the result URL is constructed in semicolon (; ), not &. There is a little bit of difference.
For example, the sample URL is like this (Notice that the red color character ):
http://localhost/phpmyadmin/index.php?db=mysql;token=2c0c27dfc21386677612120a81ae2e4a
In fact, it should be displayed as the following URL:
http://localhost/phpmyadmin/index.php?db=mysql&token=2c0c27dfc21386677612120a81ae2e4a
Thus, I review the php.ini file at my workstation. And one configuration is added.
arg_separator.input = ";"
It means that the argument separator is noted by ";", not "&". No wander that PHPMyAdmin can not run normally because of the wrong arg_separator.input.
I've posted the more details in my blog.
http://allen501pc.blogspot.tw/2012/11/php-solution-for-message-in-phpmyadmin.html
If one of developers discover that , fixed this bug in next minor version, please.
Moved to Bugs.
Please change "group" to which phpMyAdmin version you are talking about.
This code refers to the ancient version 2.11.11.
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I am the original author of this post. I've also found the bug existed in phpMyAdmin-3.5.4-rc1. No matter in 2.11.11 or 3.5.4, this bug is still not solved.
Last edit: Anonymous 2017-11-30
Reopening for further verification.
Have a look at http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2.
It seems to me that phpMyAdmin's code (in 3.5.4) respects the PHP-defined argument separator.
Thanks for your information.
But, I also confused about why the implementation in phpMyAdmin uses different separators?
I've found these code uses "&" not ";" in different ways.
In libraries/url_generating.lib.php,
function PMA_get_arg_separator($encode = 'none')
{
static $separator = null;
if (null === $separator) {
// use seperators defined by php, but prefer ';'
// as recommended by W3C
$php_arg_separator_input = ini_get('arg_separator.input');
if (strpos($php_arg_separator_input, ';') !== false) {
$separator = ';';
} elseif (strlen($php_arg_separator_input) > 0) {
$separator = $php_arg_separator_input{0};
} else {
$separator = '&';
}
}
switch ($encode) {
case 'html':
return htmlentities($separator);
break;
case 'text' :
case 'none' :
default :
return $separator;
}
}
Yes, it returns ";"(not call htmlentities(";")) as a separator when it call PMA_get_arg_separator() if we set arg_separator.input=";".
But, in sql.php, they use & ; .
That's why I get the following url instance:
sql.php?db=e_vote;token=0057173693d89d64f06ad67c52db50fe&goto=db_structure.php&table=voting&pos=0
Is it the cause of message with "query result was empty"?
I see what you mean. Indeed this is a bug, because all url generating code should go thru PMA_get_arg_separator().
Suggested patch (work in progress): https://github.com/allen501pc/phpmyadmin/commit/3056b453cc22b4596b77c2c5258e829beaa8a527
For information: most of work had been done here https://github.com/Tithugues/phpmyadmin/tree/b3733
The problem is that jQuery doesn't give a way to configure the argument separator. Some discussion about it here: https://forum.jquery.com/topic/manage-url-argument-separator
And here is the ticket that said that jQuery won't fix it: http://bugs.jquery.com/ticket/6924
So, the question is: do we accept to fix this, just at the PHP level, leaving the jQuery level unfixed? Or do we mark this whole ticket as "won't fix" ?
I wonder what percentage of the links are generated at the PHP level...
2 things:
- if jQuery never changes this, manage the separator could be confusing for server administrators ("Why sometimes the separator is ; and sometimes it's & ???")
- if jQuery changes his point of view, we'll be ready
As a ticket already exists and says that it won't be fixed, maybe it's not useful to manage it in pMA…