Меню

Phpmyadmin экспорт ошибка 500

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»;

Вы не вошли. Пожалуйста, войдите или зарегистрируйтесь.

Активные темы Темы без ответов

Страницы 1

Чтобы отправить ответ, вы должны войти или зарегистрироваться

1 2017-04-26 14:34:18

  • Remm_i
  • Новичок
  • Неактивен
  • Зарегистрирован: 2017-04-26
  • Сообщений: 1

Тема: Раздел Экспорт ошибка500

1)Что стоит:
FreeBSD 11.0 x64
Apache/2.4.25
PHP/5.6.30
MySQL/5.6.36
phpMyAdmin/4.7.0

2)При попытке открыть раздел Экспорт (админка пхпадмина)
Получаю:
Ошибка при обработке запроса
Код ошибки: 500
Текст ошибки: Internal Server Error

3)Лог ошибок апача содержит следующее

[Wed Apr 26 12:51:06.367865 2017] [core:notice] [pid 2221] AH00052: child pid 49148 exit signal Segmentation fault (11)
[Wed Apr 26 12:51:33.211775 2017] [core:notice] [pid 2221] AH00052: child pid 49157 exit signal Segmentation fault (11)
[Wed Apr 26 12:57:57.479276 2017] [core:notice] [pid 2221] AH00052: child pid 49166 exit signal Segmentation fault (11)

4)Что было сделано перед этим:
Обновлен phpMyAdmin с 4.6.х (точно версию не помню)
до текущей версии.

Тут как-бы описание диагностики подобных проблем, но для меня сложновато
https://habrahabr.ru/company/bitrix/blog/153001/

Есть у кого решения? или придется идти по длинному пути.

ps сам использую mysqldump в шеле (но нужен ещё и вебинтерфейс )

2 Ответ от Hanut 2017-04-26 16:36:15

  • Hanut
  • Hanut
  • Модератор
  • Неактивен
  • Откуда: Рига, Латвия
  • Зарегистрирован: 2006-07-02
  • Сообщений: 9,722

Re: Раздел Экспорт ошибка500

Попробуйте сменить версию phpMyAdmin поставив скрипт самостоятельно в любом удобном месте и сравните поведение. Причину такого сбоя объяснить не могу.

Сообщения 2

Страницы 1

Чтобы отправить ответ, вы должны войти или зарегистрироваться

Я получаю HTTP ERROR 500 при попытке экспорта из phpmyadmin. Это происходит только после нажатия кнопки «экспорт» после установки всех параметров экспорта. Я могу сделать mysqlbackup просто отлично, но я получаю сообщение об ошибке на export.php.

Я не совсем уверен, с чего начать, нет ошибок в любом журнале, который я проверил. Я удалил, очистил и переустановил phpmyadmin без изменений. Любая помощь будет оценена!

Я запускаю php7.0 на ubuntu 14.04.

задан
25 June 2017 в 01:44

поделиться

3 ответа

Перейти к /usr/share/phpmyadmin/export.php

В строке 864: изменить break 2; на break;

Источник: github

Работал для меня;) [ ! d4]

ответ дан Guillaume Le Mière
22 May 2018 в 21:11

поделиться

Перейти к /usr/share/phpmyadmin/export.php

В строке 864: изменить break 2; на break;

Источник: github

Работал для меня;) [ ! d4]

ответ дан Guillaume Le Mière
18 July 2018 в 11:09

поделиться

Перейти к /usr/share/phpmyadmin/export.php

В строке 864: изменить break 2; на break;

Источник: github

Работал для меня;) [ ! d4]

ответ дан Guillaume Le Mière
24 July 2018 в 19:44

поделиться

05 Apr 2020 | Автор: dd |

Столкнулся с глюком phpMyAdmin: при попытке импорта базы данных движок phpMyAdmin вываливался в 500 ошибку. Причем какие то таблички он создавал, но не полностью. На самой странице ошибки просто писалось, что что то пошло не так.

Попытка найти что то в логах /var/log/httpd/error_log ничего не дала, ровно как и задание полных прав на /var/lib/php/session
# chmod -R 777 /var/lib/php/session

Прежде чем включать логирование пыха на полную катушку, решил попробовать загрузить базу данных из консоли, ибо там ошибки отдаются довольно однозначно; и тут же получил ожидаемый результат The used table type doesn’t support FULLTEXT indexes

Ошибка возникает из-за конфликтов версий, т.к мускуль 5.5 не поддерживает в InnoDB те самые FULLTEXT indexes и в этом случае необходимо либо обновлять движок базы данных до 5.6+ либо же сказать скрипту создания таблиц, использовать MyISAM вместо InnoDB при создании таблички.

Скажу честно, лень возобладала, т.ч ничего не стал обновлять, а просто тупо заменил в дампе базы все упоминания InnoDB на MyISAM, после чего база нормально всосалась, как в сухую землю.

Сделать замену можно либо в текстовом редакторе, вроде Notepad+, либо, особенно если дамп базы большой, средствами того же sed
# sed -e ‘s/InnoDB/MyISAM/g’ OLD-dump.sql > NEW-dump.sql

Rating: 3.4/10 (162 votes cast)

Rating: -2 (from 38 votes)

500 ошибка phpMyAdmin при импорте базы, 3.4 out of 10 based on 162 ratings

Теги: mysql

Symptoms

Export/import of database via phpMyAdmin fails with Internal Server Error:

Error in Processing Request
Error code: 500
Error text: Internal Server Error

Other memory consuming actions can also lead to such error.

The following error can be found in the /var/log/httpd/error_log file on phpMyAdmin server:

[Wed Feb 12 21:01:12 2014] [error] [client 192.168.10.10] PHP Fatal error:  Allowed memory size of 25165824 bytes exhausted (tried to allocate 12287528 bytes) in /usr/local/pem/sysvhosts/phpMyAdmin/libraries/zip.lib.php on line 114, referer:

or:

PHP Fatal error:  Allowed memory size of 25165824 bytes exhausted (tried to allocate 71 bytes) in /usr/local/pem/sysvhosts/phpMyAdmin4/libraries/tcpdf/unicode_data.php on line 10951

Cause

PHP memory limit is low on the side of phpMyAdmin server.

# grep memory_limit /usr/libexec/php4-cgi/etc/php.ini
memory_limit = 24M

In case of LSH NG the path is:

# grep 'memory_limit' /var/www/cgi-bin/sw-engine/php.ini
memory_limit = 24M

Resolution

Increase PHP memory_limit on the server where phpMyAdmin service is enabled.

Internal content

In this post, I will let you know the solution of exporting database from phpmyadmin.

This error occurs when you have updated your PHP version, phpmyadmin donot allow to export database file and shows following error :

500 error on phpmyadmin export on /phpmyadmin/export.php

After lots of searching, I got a solution, go with the Apache error log file :

PHP Fatal error: Cannot ‘break’ 2 levels in /usr/share/phpmyadmin/export.php on line 864

So go to the «/usr/share/phpmyadmin/export.php» file and change break 2; by break;.

If you are running on Ubuntu server, you can run following command to edit the export.php file :

sudo nano /usr/share/phpmyadmin/export.php

Search for ” (! $export_plugin->exportDBFooter($db)) {” and change the «break 2» by «break».

Now restart apache and mysql and it should fix the issue.

sudo service apache2 restart

sudo service mysql restart

Try this..

0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Phpmyadmin проверка баз mysql на ошибки
  • Pioneer mvh s120ub ошибка 19