Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arg_separator breaks PMA: Call to a member function getCurrentUserAndHost #13940

xuefer opened this issue Jan 16, 2018 · 4 comments

arg_separator breaks PMA: Call to a member function getCurrentUserAndHost #13940

xuefer opened this issue Jan 16, 2018 · 4 comments


Copy link

@xuefer xuefer commented Jan 16, 2018

Steps to reproduce

  1. delete one row in "Browse"

Expected behaviour

row get deleted, success

Actual behaviour

Fatal error: Uncaught Error: Call to a member function getCurrentUserAndHost() on null in /var/www/htdocs/phpMyAdmin/libraries/
Stack trace:
#0 /var/www/htdocs/phpMyAdmin/sql.php(21): require_once()
#1 {main} thrown in /var/www/htdocs/phpMyAdmin/libraries/ on line 14

Server configuration

Operating system: Gentoo

Web server: lighttpd

Database: mariadb

PHP version: 7.1

phpMyAdmin version: git master rev 2823d27

Client configuration

Browser: Chrome

Operating system: Windows

it is triggered by arg_separator.input = "&;" php setting
PMA tends to use ";" which is ok most of the time, but for POST data, php (nor chrome F12 developer tools) don't recognize ; as separator, see php-src code at;a=blob;f=main/php_variables.c;h=9e7f185bd944715b11d3e69005b533b99b983d65;hb=HEAD#l295

the data being posted is:
as you can see it mix ; with & while both should be supported when in query string, it is not supported in post content, even Content-Type is application/x-www-form-urlencoded; charset=UTF-8

Copy link

@OlafvdSpek OlafvdSpek commented Jan 17, 2018

";" is NOT in arg_separator.input by default is it (unfortunately)?
How did this ever work?

Copy link

@xuefer xuefer commented Jan 18, 2018

for years i use input="&;" and output=";" without problems, not with old PMA, but i just got PMA updated recently and this bug happen

it isn't by default but recommended by w3c, and prefered (if set) by pma
it works by having arg_separator.output = ";" (whichtell generate ";") and arg_separator.input = "&;" (which make PHP parser recognize "&;", but only in query string parser, not for post data)
PHP assume all data POST to server is generated by browser using & in all case, which is right
while PMA copy query string and concat it as POST data for XMLHttpRequest

should i post this bug PHP group instead?

@nijel nijel self-assigned this Mar 1, 2018
@nijel nijel added the bug label Mar 1, 2018
@nijel nijel added this to the 4.7.9 milestone Mar 1, 2018
@nijel nijel closed this in 984c6a0 Mar 1, 2018
Copy link

@OlafvdSpek OlafvdSpek commented Mar 1, 2018

@nijel Are you sure the fix is correct? AFAIK POST requires &, even though PHP might be set to require ; for GET.

Copy link

@nijel nijel commented Mar 5, 2018

It seemed to work correctly in my tests, but I'll try to test this again...

@nijel nijel modified the milestones: 4.7.9, 4.8.0 Mar 5, 2018
nijel added a commit that referenced this issue Mar 5, 2018
This reverts commit 984c6a0.

See #13940

Signed-off-by: Michal Čihař <>
nijel added a commit that referenced this issue Mar 5, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.