Error in processing request Error code: 500 Error text: Internal Server Error in Phpmyadmin – ubuntu – 18.04

I newly Installed Linux, Apache, MySQL, PHP (LAMP) in my PC. In PHP Environment its working good but when i access my databse tables in phpmyadmin, i got following Error.

Error in processing request
Error code: 500
Error text: Internal Server Error

Version Info :

MYSQL : 5.7.25

PHP : 7.2.15

ubuntu : 18.04.2

Apache : 2.4.29

How to Fix it.

I thing this error comes from a phpmyadmin library

So, we need to modify following File

File Location : /usr/share/phpmyadmin/libraries/sql.lib.php

Line No : 614

run following command in ubuntu terminal

sudo nano /usr/share/phpmyadmin/libraries/sql.lib.php

Replace two codes :

Replace : (count($analyzed_sql_results[‘select_expr’] == 1)

With : (count($analyzed_sql_results[‘select_expr’]) == 1)

Replace : && ($analyzed_sql_results[‘select_expr’][0] == ‘*’)))

With : && ($analyzed_sql_results[‘select_expr’][0] == ‘*’))

/**
* Function to check whether to remember the sorting order or not
*
* @param array $analyzed_sql_results the analyzed query and other variables set
*                                    after analyzing the query
*
* @return boolean
*/
function PMA_isRememberSortingOrder($analyzed_sql_results)
{
return $GLOBALS['cfg']['RememberSorting']
    && ! ($analyzed_sql_results['is_count']
        || $analyzed_sql_results['is_export']
        || $analyzed_sql_results['is_func']
        || $analyzed_sql_results['is_analyse'])
    && $analyzed_sql_results['select_from']
    && ((empty($analyzed_sql_results['select_expr']))
        || (count($analyzed_sql_results['select_expr']) == 1)
            && ($analyzed_sql_results['select_expr'][0] == '*'))
    && count($analyzed_sql_results['select_tables']) == 1;
}

i hope this post is help for you…

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *