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

Error 500 rejected when grouping only in the newest version #13848

Closed
gruenebanane opened this Issue Nov 29, 2017 · 8 comments

Comments

Projects
None yet
5 participants
@gruenebanane

gruenebanane commented Nov 29, 2017

Steps to reproduce

  1. A table in a database has to be created with a column to be grouped by
  2. SQL command: "SELECT foo, count(*) from table group by foo;"

Expected behaviour

A table should appear with the result.

Actual behaviour

Error 500 error (rejected)

Server configuration

Operating system:
Debian Stable

Web server:
NGINX

Database:
MariaDB

PHP version:
7.0

phpMyAdmin version:
4.7.5 with the error
4.7.4 works fine

Client configuration

doesn't matter

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Nov 29, 2017

Member

Can you please check PHP error logs to see the failure?

Member

nijel commented Nov 29, 2017

Can you please check PHP error logs to see the failure?

@gruenebanane

This comment has been minimized.

Show comment
Hide comment
@gruenebanane

gruenebanane Nov 29, 2017

Nothing, the detailed error message is "It seems that the connection to server has been lost. Please check your network connectivity and server status.". I could reproduce it with a fresh VM with another distro, I assume its a general error.

gruenebanane commented Nov 29, 2017

Nothing, the detailed error message is "It seems that the connection to server has been lost. Please check your network connectivity and server status.". I could reproduce it with a fresh VM with another distro, I assume its a general error.

@OlafvdSpek

This comment has been minimized.

Show comment
Hide comment
@OlafvdSpek

OlafvdSpek Nov 30, 2017

The nginx logs should show the 500 error.

OlafvdSpek commented Nov 30, 2017

The nginx logs should show the 500 error.

@sido420

This comment has been minimized.

Show comment
Hide comment
@sido420

sido420 Dec 7, 2017

I'm in a similar situation using the latest PHPMyAdmin development version on MySQL 5.7.x (latest) with PHP 7.

Here is the error I get in PHPMyAdmin as soon as I try running the query:

Error in processing request
Error code: 500
Error text: error (rejected)
It seems that the connection to server has been lost. Please check your network connectivity and server status

Query:

SELECT JSON_EXTRACT(data, '$.key') FROM `tbl1` a JOIN `tbl2` e ON a.id = e.id WHERE e.type_id = 'x' AND a.some_id BETWEEN y AND z AND JSON_VALID(data)

Apache logs contain:

hu Dec 07 17:21:05 2017] [error] [client 127.0.0.1] PHP Fatal error: Uncaught Error: Call to undefined method PhpMyAdmin\\DisplayResults::removeUiProp() in
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php:3403\nStack trace:\n#0
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php(1667): PhpMyAdmin\\DisplayResults->_getColumnParams(Array)\n#1
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php(1310): PhpMyAdmin\\DisplayResults->_getDataForResettingColumnOrder(Array)\n#2
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php(4442): PhpMyAdmin\\DisplayResults->_getTableHeaders(Array, Array, 'SELECT JSON_EXT...', Array, Array,
Array, false)\n#3 /var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/Sql.php(1709): PhpMyAdmin\\DisplayResults->getTable(Object(mysqli_result), Array, Array, false)\n#4
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/Sql.php(2000): PhpMyAdmin\\Sql::getHtmlForSqlQueryResultsTable(Object in
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php on line 3403

sido420 commented Dec 7, 2017

I'm in a similar situation using the latest PHPMyAdmin development version on MySQL 5.7.x (latest) with PHP 7.

Here is the error I get in PHPMyAdmin as soon as I try running the query:

Error in processing request
Error code: 500
Error text: error (rejected)
It seems that the connection to server has been lost. Please check your network connectivity and server status

Query:

SELECT JSON_EXTRACT(data, '$.key') FROM `tbl1` a JOIN `tbl2` e ON a.id = e.id WHERE e.type_id = 'x' AND a.some_id BETWEEN y AND z AND JSON_VALID(data)

Apache logs contain:

hu Dec 07 17:21:05 2017] [error] [client 127.0.0.1] PHP Fatal error: Uncaught Error: Call to undefined method PhpMyAdmin\\DisplayResults::removeUiProp() in
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php:3403\nStack trace:\n#0
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php(1667): PhpMyAdmin\\DisplayResults->_getColumnParams(Array)\n#1
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php(1310): PhpMyAdmin\\DisplayResults->_getDataForResettingColumnOrder(Array)\n#2
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php(4442): PhpMyAdmin\\DisplayResults->_getTableHeaders(Array, Array, 'SELECT JSON_EXT...', Array, Array,
Array, false)\n#3 /var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/Sql.php(1709): PhpMyAdmin\\DisplayResults->getTable(Object(mysqli_result), Array, Array, false)\n#4
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/Sql.php(2000): PhpMyAdmin\\Sql::getHtmlForSqlQueryResultsTable(Object in
/var/www/html/phpMyAdmin-4.8+snapshot-all-languages/libraries/classes/DisplayResults.php on line 3403
@sido420

This comment has been minimized.

Show comment
Hide comment
@sido420

sido420 Dec 7, 2017

FYI: query works in CLI and returns results as normal.

sido420 commented Dec 7, 2017

FYI: query works in CLI and returns results as normal.

@Napoleon-BlownApart

This comment has been minimized.

Show comment
Hide comment
@Napoleon-BlownApart

Napoleon-BlownApart Dec 15, 2017

I have the same error on a Mac 10.13.2 using Apache/2.4.28 (Unix) PHP/7.1.7 with Server version: 5.7.20 - MySQL Community Server (GPL) running phpMyAdmin v4.7.6 (up to date).

The specific error message is:

Error in processing request
Error code: 500
Error text: Internal Server Error (rejected)
It seems that the connection to server has been lost. Please check your network connectivity and server status

A query such as select * from table; works, but as soon as I specify a column, it fails; i.e. select name from table;. As stated above, the query works fine in the CLI interface.

/var/log/apache2/error_log has the following:

[Fri Dec 15 20:29:30.435862 2017] [php7:error] [pid 338] [client ::1:49319] PHP Fatal error:  Uncaught Error: Call to undefined method PMA\\libraries\\DisplayResults::removeUiProp() in /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php:3405
Stack trace:
#0 /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php(1658): PMA\\libraries\\DisplayResults->_getColumnParams(Array)
#1 /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php(1301): PMA\\libraries\\DisplayResults->_getDataForResettingColumnOrder(Array)
#2 /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php(4449): PMA\\libraries\\DisplayResults->_getTableHeaders(Array, Array, 'SELECT `name` F...', Array, Array, Array, false)
#3 /Library/WebServer/Documents/phpmyadmin/libraries/sql.lib.php(1692): PMA\\libraries\\DisplayResults->getTable(Object(mysqli_result), Array, Array, false)
#4 /Library/WebServer/Documents/phpmyadmin/libraries/sql.lib.php(1983): PMA_getHtmlForSqlQueryResultsTable(Object(PMA\\libraries\\DisplayResults), './themes/pmahom...', NULL, Array, false, '317043', 25, NULL, Object(mysqli_r in /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php on line 3405

The removeUiProp function exists in Table.php (1829).

Napoleon-BlownApart commented Dec 15, 2017

I have the same error on a Mac 10.13.2 using Apache/2.4.28 (Unix) PHP/7.1.7 with Server version: 5.7.20 - MySQL Community Server (GPL) running phpMyAdmin v4.7.6 (up to date).

The specific error message is:

Error in processing request
Error code: 500
Error text: Internal Server Error (rejected)
It seems that the connection to server has been lost. Please check your network connectivity and server status

A query such as select * from table; works, but as soon as I specify a column, it fails; i.e. select name from table;. As stated above, the query works fine in the CLI interface.

/var/log/apache2/error_log has the following:

[Fri Dec 15 20:29:30.435862 2017] [php7:error] [pid 338] [client ::1:49319] PHP Fatal error:  Uncaught Error: Call to undefined method PMA\\libraries\\DisplayResults::removeUiProp() in /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php:3405
Stack trace:
#0 /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php(1658): PMA\\libraries\\DisplayResults->_getColumnParams(Array)
#1 /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php(1301): PMA\\libraries\\DisplayResults->_getDataForResettingColumnOrder(Array)
#2 /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php(4449): PMA\\libraries\\DisplayResults->_getTableHeaders(Array, Array, 'SELECT `name` F...', Array, Array, Array, false)
#3 /Library/WebServer/Documents/phpmyadmin/libraries/sql.lib.php(1692): PMA\\libraries\\DisplayResults->getTable(Object(mysqli_result), Array, Array, false)
#4 /Library/WebServer/Documents/phpmyadmin/libraries/sql.lib.php(1983): PMA_getHtmlForSqlQueryResultsTable(Object(PMA\\libraries\\DisplayResults), './themes/pmahom...', NULL, Array, false, '317043', 25, NULL, Object(mysqli_r in /Library/WebServer/Documents/phpmyadmin/libraries/DisplayResults.php on line 3405

The removeUiProp function exists in Table.php (1829).

@nijel nijel self-assigned this Dec 15, 2017

@nijel nijel added the bug label Dec 15, 2017

@nijel nijel added this to the 4.7.7 milestone Dec 15, 2017

@nijel nijel closed this in 59d960c Dec 15, 2017

@Napoleon-BlownApart

This comment has been minimized.

Show comment
Hide comment
@Napoleon-BlownApart

Napoleon-BlownApart Dec 15, 2017

Line 3405 in DisplayResults.php should read:
$pmatable->removeUiProp(Table::PROP_COLUMN_ORDER);
not
$this->removeUiProp(Table::PROP_COLUMN_ORDER);

Fixes it on my system :)

Napoleon-BlownApart commented Dec 15, 2017

Line 3405 in DisplayResults.php should read:
$pmatable->removeUiProp(Table::PROP_COLUMN_ORDER);
not
$this->removeUiProp(Table::PROP_COLUMN_ORDER);

Fixes it on my system :)

@nijel

This comment has been minimized.

Show comment
Hide comment
@nijel

nijel Dec 15, 2017

Member

Yes, that what I've changed in 59d960c.

Member

nijel commented Dec 15, 2017

Yes, that what I've changed in 59d960c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment