Menu

#3733 Code should avoid hard-coded argument separator

3.5.4
wont-fix
nobody
5
2015-04-01
2012-11-12
Anonymous
No

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.

Discussion

  • Marc Delisle

    Marc Delisle - 2012-11-12

    Moved to Bugs.

    Please change "group" to which phpMyAdmin version you are talking about.

     
  • Marc Delisle

    Marc Delisle - 2012-11-12
    • labels: 509121 --> Displaying results
    • milestone: 284147 -->
     
  • Marc Delisle

    Marc Delisle - 2012-11-13
    • status: open --> wont-fix-out-of-date
     
  • Marc Delisle

    Marc Delisle - 2012-11-13

    This code refers to the ancient version 2.11.11.

     
  • Anonymous

    Anonymous - 2012-11-15

    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
  • Marc Delisle

    Marc Delisle - 2012-11-15
    • status: wont-fix-out-of-date --> open
     
  • Marc Delisle

    Marc Delisle - 2012-11-15

    Reopening for further verification.

     
  • Marc Delisle

    Marc Delisle - 2012-11-15
    • milestone: --> 3.5.4
     
  • Marc Delisle

    Marc Delisle - 2012-11-15
    • status: open --> pending
     
  • Jyun-Yao Huang

    Jyun-Yao Huang - 2012-11-15

    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 &amp ; .
    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"?

     
  • Marc Delisle

    Marc Delisle - 2012-11-15
    • summary: Message of "Query was empty" should be resolved. --> Code should avoid hard-coded argument separator
    • status: pending --> open
     
  • Marc Delisle

    Marc Delisle - 2012-11-15

    I see what you mean. Indeed this is a bug, because all url generating code should go thru PMA_get_arg_separator().

     
  • Marc Delisle

    Marc Delisle - 2014-08-09

    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...

     
  • Hugues Peccatte

    Hugues Peccatte - 2014-08-09

    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…

     
  • Marc Delisle

    Marc Delisle - 2014-08-09
    • status: open --> wont-fix
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.