Ошибка при обработке запроса код ошибки 500 phpmyadmin

PhpMyAdmin allows easy editing of website databases.

But, at times due to missing server modules or wrong permissions, PhpMyAdmin error 500 shows up. PhpMyAdmin will work only after fixing the real problem.

That’s why, we often get requests from customers to fix PhpMyAdmin errors as part of our Technical Support Services.

Today, we’ll see the reasons that cause PhpMyAdmin error 500 and how we fix them.

Why to use PhpMyAdmin?

In internet, a major share of websites work based on the underlying databases. Therefore, website owners often need to modify databases as part of the website management.  Unfortunately, managing databases via command line can be a tedious task. That’s where editing databases via PhpMyAdmin helps.

PhpMyAdmin is nothing but a tool that helps to create, manage databases from the browser. Usually, it is secured by a username and password.

Editing database is rather simple in PhpMyAdmin. Obviously, it’s a solution that our Dedicated Engineers often suggest to customers for quick database edits. But, trouble comes when it report errors.

Reasons for error 500 in PhpMyAdmin

From our experience in managing servers, we often see errors with PhpMyAdmin at various stages. It can shows 500 errors while installation or even when users access it to modify databases.

Now, let’s see the main reasons for PhpMyAdmin error 500.

1. Missing dependency modules

PhpMyAdmin utility depends largely on certain PHP modules like php-mbstring, php-gettext, etc. Unfortunately, these modules do not come across with many standard PHP packages.

When doing a fresh installation of PhpMyAdmin, the setup will create all the required PhpMyAdmin files. But, if these related modules are missing on the server, accessing PhpMyAdmin reports “500 Internal Server Error” status code. At times, it can be even a blank page.

2. Wrong permissions

Similarly, wrong permissions of php files can also be a reason for PhpMyAdmin errors. For example, in cPanel servers, wrong permission on the files like /usr/local/cpanel/3rdparty/bin/php, /usr/local/cpanel/3rdparty/bin/php-cgi create problems with PhpMyAdmin. Any permission other than 755 will cause PhpMyAdmin to stop working.

3. PHP configuration limits

Yet another common reason for internal server error in PhpMyAdmin can be PHP limits set in the server. For security reasons, PHP limits the maximum resources a PHP process can use on the server. If any process cross these limits like memory_limit, max_input_vars, etc. it results in the error as shown.

How we fix PhpMyAdmin internal server error?

Till now we saw the top 3 reasons that can result in internal server error in PhpMyAdmin. The solution depends on the root cause for the error. We’ll now check how our Support Engineers fix each of them.

1. Missing modules

Recently, one of customers was getting 500 error during PhpMyAdmin installation on one of his domains. His Ubuntu server had Apache2.4 and PHP 7. When tried to open PhpMyAdmin for the first time, it reported internal server error.

On detailed troubleshooting, our Dedicated Engineers found that couple of PHP modules were missing on the server. Therefore, we installed the missing modules using:

apt-get install php-mbstring php7.0-mbstring php-gettext

Then we restarted Apache, and PhpMyAdmin started working fine.

2. Fixing permissions

In many cases, fixing permissions will solve the PhpMyAdmin error 500. Here, we check the php binary files and set them with 755 permissions.

Recently, when a Plesk customer attempted to make a change to a database field in phpMyAdmin, the system crashed with 500 Internal Server Error.

Our Support Engineers saw the following records on /var/log/sw-cp-server/error_log file:

*1110 open() "/var/lib/sw-cp-server/body/0000000014" failed (13: Permission denied), client:, server: , request: "POST /domains/databases/phpMyAdmin/import.php HTTP/1.1"

Here, the problem happened due to wrong ownership for /var/lib/sw-cp-server/ directory. Therefore, we fixed it by setting correct ownership and permission on the directory using:

chown sw-cp-server:sw-cp-server /var/lib/sw-cp-server/
chmod 700 /var/lib/sw-cp-server/

3. Setting proper PHP limits

For trouble caused by PHP limits, there will be related entries in the web server log files. Therefore, to fix PhpMyAdmin errors, our Support Engineers always check the log files as the initial step.

For example, when customer tried to open a large table via phpMyAdmin the following error displayed in the logs.

[29-Mar-2019 12:49:10] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 401128 bytes) in /opt/psa/admin/htdocs/domains/databases/phpMyAdmin/libraries/DisplayResults.php on line 2852

Obviously, from the error log, we could identify that insufficient PHP memory limit was causing the error. Therefore, the fix was to set proper values in the correct php.ini file, followed by a web server restart. The customer was having a Plesk server. So we increased the memory_limit, max_input_vars parameters in the file /usr/local/psa/admin/conf/php.ini.

In cPanel servers, each version of PHP on the server uses its own php.ini file. In such cases, our Dedicated Engineers ensure that we set the limits in the correct php.ini file used by the domain.

[Getting internal server error on PhpMyAdmin? We are here to fix it.]

Conclusion

In a nutshell, PhpMyAdmin error 500 shows up due to missing server modules, wrong permissions, PHP limits and so on. Today, we discussed these reasons in detail and how our Dedicated Engineers fix them and make PhpMyAdmin working.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

When i’m running phpMyAdmin and click to Export/Import I always get an error:

Error in processing request Error code: 500 Error text: Internal Server Error.
OS — Ubuntu 18.04

asked Jul 30, 2018 at 5:02

Ovruchsky's user avatar

1

I faced problem. My php version was 7.2. Actually this error comes from a phpmyadmin library. The library name is /usr/share/phpmyadmin/libraries/sql.lib.php. In this file line no 614. So you need to modify the file

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

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

or you can replace full method bellow:

/**
* 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 may help. Thank you.

answered Dec 9, 2018 at 18:22

Kalyan Halder's user avatar

3

Edit file /usr/share/phpmyadmin/libraries/sql.lib.php:

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

Replace:

function PMA_isRememberSortingOrder($analyzed_sql_results)
{
    ......
}

With:

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);
}

Restart the server apache:

sudo service apache2 restart

This should work.

answered Sep 19, 2019 at 20:00

Ratul Hasan's user avatar

WorldDelete

Собственно вопрос в названии. Дополню. Ошибки нету. Ставился из ispmanager. Была ошибка до этого open_basedir, теперь нету. Но ошибка не исчезла, все так же 500.


  • Вопрос задан

  • 5044 просмотра

Собственно, закрою темку, решил таким способом.
1) Удалил полностью php с машины, удалил все пакеты ispmanager связанные с php и вебсерваком
2) Удалил phpmyadmin
3) Переустановил вебсервер и добавил php5.6
4) Установил пхпмуадмин
Спасибо prostovlad за помощь

посмотрите в панеле какая версия php у вас стоит по native, если 7 то измените на 5.6

Пригласить эксперта

Код ответа на ошибку сервера 500 Internal Server Error указывает, что сервер столкнулся с неожиданным условием, которое помешало ему выполнить запрос.

Можно посмотреть error.log, там будут подробности. Или включить вывод ошибок прямо в браузер.


  • Показать ещё
    Загружается…

22 сент. 2023, в 19:00

1000 руб./за проект

22 сент. 2023, в 18:59

30000 руб./за проект

22 сент. 2023, в 18:50

5000 руб./за проект

Минуточку внимания

Typically, when users receive a 500 internal server error warning through phpMyAdmin, it comes down to an issue of permissions. phpMyAdmin requires specific permission settings and should this change for some reason, it can produce a 500 series error. Often, this is due to changes made when upgrading cPanel to newer versions.

Luckily, by updating the permissions of a couple specific files, you can usually resolve this issue in just a few steps.

Updating Permissions for phpMyAdmin

To change the permissions settings, follow these steps:

  1. To start, check the current permissions settings for the following files:

    /usr/local/cpanel/3rdparty/bin/php

    /usr/local/cpanel/3rdparty/bin/php-cgi

    To check the permissions, you’ll need to use the command:

    ls -l

  2. The files listed above should be set to 755 permissions. When listed out using the ls -l command, they should look like: rxxr-xr-x. If not, then change the permission to 755 using the command:

    chmod 775

    followed by the location of the file you’re changing.

  3. Once the permissions have been changed, execute the command shown below from the shell.

    /scripts/makecpphp

Now, with these permissions fixed, you should not receive the phpMyAdmin 500 internal server error anymore.

Popular Links

Looking for more information on phpMyAdmin? Search our Knowledge Base!

Interested in more articles about Databases? Navigate to our Categories page using the bar on the left or check out these popular articles:

  • View the Contents of a Table in a SQL Server Database Using Enterprise Manager
  • Create a MySQL Backup from Command Line – MySQL Import SQL File
  • How to Install SQL Server 2012 Express on Windows Server 2012

Popular tags within this category include: MySQL, MSSQL, phpMyAdmin, PostgreSQL, and more.

Don’t see what you’re looking for? Use the search bar at the top to search our entire Knowledge Base.

The Hivelocity Difference

Seeking a better Dedicated Server solution? In the market for Private Cloud or Colocation services? Check out Hivelocity’s extensive list of products for great deals and offers.

With best-in-class customer service, affordable pricing, a wide-range of fully-customizable options, and a network like no other, Hivelocity is the hosting solution you’ve been waiting for.

Unsure which of our services is best for your particular needs? Call or live chat with one of our sales agents today and see the difference Hivelocity can make for you.

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.

Когда я запускаю phpMyAdmin и нажимаю «Экспорт / импорт», я всегда получаю сообщение об ошибке:

Ошибка в обработке запроса Код ошибки: 500 Текст ошибки: Внутренняя ошибка сервера.
ОС — Ubuntu 18.04

0

Решение

Я столкнулся с проблемой. Моя версия PHP была 7,2. На самом деле эта ошибка происходит из библиотеки phpmyadmin. Название библиотеки /usr/share/phpmyadmin/libraries/sql.lib.php. В этой строке файла нет 614. Так что вам нужно изменить файл

От && ($ analysis_sql_results [‘select_expr’] [0] == ‘*’)))

в && ($ analysis_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;
}

Я надеюсь, что это может помочь. Спасибо.

1

Другие решения

Других решений пока нет …

Like this post? Please share to your friends:
  • Ошибка при обработке запроса варкрафт рефордж
  • Ошибка при обработке запроса варкрафт 3 рефоржед
  • Ошибка при обновлении гугл плей
  • Ошибка при обработке групповой политики wmi
  • Ошибка при обработке запроса 400 на сайте прокуратуры