Pma 500 ошибка

I’m getting internal server error (HTTP Error 500) after installing phpmyadmin on a certain domain.

This is what my config.inc.php file currently reads.

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use setup/
 *
 * All directives are explained in documentation in the doc/ folder
 * or at <http://docs.phpmyadmin.net/>.
 *
 * @package PhpMyAdmin
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

/**
 * Defines whether a user should be displayed a "show all (records)"
 * button in browse mode or not.
 * default = false
 */
//$cfg['ShowAll'] = true;

/**
 * Number of rows displayed when browsing a result set. If the result
 * set contains more rows, "Previous" and "Next".
 * default = 30
 */
//$cfg['MaxRows'] = 50;

/**
 * disallow editing of binary fields
 * valid values are:
 *   false    allow editing
 *   'blob'   allow editing except for BLOB fields
 *   'noblob' disallow editing except for BLOB fields
 *   'all'    disallow editing
 * default = blob
 */
//$cfg['ProtectBinary'] = 'false';

/**
 * Default language to use, if not browser-defined or user-defined
 * (you find all languages in the locale folder)
 * uncomment the desired line:
 * default = 'en'
 */
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';

/**
 * default display direction (horizontal|vertical|horizontalflipped)
 */
//$cfg['DefaultDisplay'] = 'vertical';


/**
 * How many columns should be used for table display of a database?
 * (a value larger than 1 results in some information being hidden)
 * default = 1
 */
//$cfg['PropertiesNumColumns'] = 2;

/**
 * Set to true if you want DB-based query history.If false, this utilizes
 * JS-routines to display query history (lost by window close)
 *
 * This requires configuration storage enabled, see above.
 * default = false
 */
//$cfg['QueryHistoryDB'] = true;

/**
 * When using DB-based query history, how many entries should be kept?
 *
 * default = 25
 */
//$cfg['QueryHistoryMax'] = 100;

/**
 * Should error reporting be enabled for JavaScript errors
 *
 * default = 'ask' 
 */
//$cfg['SendErrorReports'] = 'ask';

/*
 * You can find more configuration options in the documentation
 * in the doc/ folder or at <http://docs.phpmyadmin.net/>.
 */
?>

What changes do I need to do on this file? I’ve already followed up various posts but its not helping.
It this the problem with the domain being down?

Thanks in advance.

asked Feb 11, 2014 at 10:51

Phantom's user avatar

7

If you are using apache2.4 and PHP 7, run

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

then restart your server

sudo service apache2 restart

answered Apr 25, 2016 at 10:10

Fredrick Anyera M's user avatar

3

I know it has been a couple of years, and I noticed by your comments that still no luck. Here I run into the same 500 error after installing through apt.
I look for my Apache error log file (/var/log/apache2/error.log), and there was the following entry:

[Thu Aug 11 22:38:25.930453 2016] [:error] [pid 18138] [client ::1:35026] PHP Fatal error:  require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477

It shows that the library gettext was not found, so I intalled it:

sudo apt-get install  php-gettext

And restarted Apache:

sudo service apache2 restart

That worked for me. Hope it helps.
PS: If still not working you may try to sym link the folder just in case:

sudo ln -s /usr/share/phpmyadmin /var/www/

answered Aug 11, 2016 at 20:58

Raúl's user avatar

RaúlRaúl

711 silver badge3 bronze badges

OK, if you have already installed packages php-mbstring and php-gettext and it still doesn’t work, first take a look to Apache logs:

tail /var/log/apache2/error.log

If you find something like this:

Fatal error: Uncaught Twig_Error_Syntax: Unexpected «apply» tag
(expecting closing tag for the «if» tag defined near line 17). in
/usr/share/phpmyadmin/templates/columns_definitions/column_virtuality.twig
on line 17

This is a known bug in phpmyadmin 4.9.4

The bug has been fixed in phpmyadmin 4.9.5 but please note that if you are under Debian 10 Buster you will need to upgrade the package php-twig to an higher version rather than the one included with Buster, or package phpmyadmin
will be kept back to 4.9.4 during system upgrades.

You can simply upgrade php-twig from next Debian version (11, Bullseye)

apt-get install php-twig/bullseye

This worked for me.
Hope this doesn’t broke something else in Deb 10 LAMP setup.

answered Apr 16, 2020 at 17:01

bytepan's user avatar

bytepanbytepan

3612 silver badges5 bronze badges

Ensure that your PHP version matches the used PHP module in Apache2:

php -v  //PHP 7.4.4 
ls -d /etc/apache2/mods-enabled/php*.conf // php7.3.conf

sudo a2dismod php7.3  // disable 7.3
sudo a2enmod php7.4   // enable 7.4
sudo systemctl restart apache2

I installed the php-mbstring php-gettext (also excplicitly for latest PHP version), but it still wasn’t working. At least it took me hours until I noticed apache decides itself what PHP version is used.

answered Apr 6, 2020 at 20:51

User Rebo's user avatar

User ReboUser Rebo

2,69123 silver badges30 bronze badges

After applying all the above mentioned solution, none worked for me.

This worked for me:

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] == ‘*’))

answered Jun 25, 2020 at 19:46

PrafulPravin's user avatar

if you want to access the mysql data from your server to your computer

you need to change

$cfg['Servers'][$i]['host'] = 'localhost';

to you server ip address.

$cfg['Servers'][$i]['host'] = 'your.server.ip.add.here';

update

$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['host'] = 'your.server.ip.add.here';
$cfg['Servers'][$i]['user'] = 'db name here';
$cfg['Servers'][$i]['password'] = 'db password';

make sure that those fields are properly set up..

answered Feb 11, 2014 at 11:28

ibondoc22's user avatar

2

I’m getting internal server error (HTTP Error 500) after installing phpmyadmin on a certain domain.

This is what my config.inc.php file currently reads.

<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
 * phpMyAdmin sample configuration, you can use it as base for
 * manual configuration. For easier setup you can use setup/
 *
 * All directives are explained in documentation in the doc/ folder
 * or at <http://docs.phpmyadmin.net/>.
 *
 * @package PhpMyAdmin
 */

/*
 * This is needed for cookie based authentication to encrypt password in
 * cookie
 */
$cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/*
 * Servers configuration
 */
$i = 0;

/*
 * First server
 */
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysql if your server does not have mysqli */
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;

/*
 * phpMyAdmin configuration storage settings.
 */

/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
/* Contrib / Swekey authentication */
// $cfg['Servers'][$i]['auth_swekey_config'] = '/etc/swekey-pma.conf';

/*
 * End of servers configuration
 */

/*
 * Directories for saving/loading files from server
 */
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

/**
 * Defines whether a user should be displayed a "show all (records)"
 * button in browse mode or not.
 * default = false
 */
//$cfg['ShowAll'] = true;

/**
 * Number of rows displayed when browsing a result set. If the result
 * set contains more rows, "Previous" and "Next".
 * default = 30
 */
//$cfg['MaxRows'] = 50;

/**
 * disallow editing of binary fields
 * valid values are:
 *   false    allow editing
 *   'blob'   allow editing except for BLOB fields
 *   'noblob' disallow editing except for BLOB fields
 *   'all'    disallow editing
 * default = blob
 */
//$cfg['ProtectBinary'] = 'false';

/**
 * Default language to use, if not browser-defined or user-defined
 * (you find all languages in the locale folder)
 * uncomment the desired line:
 * default = 'en'
 */
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';

/**
 * default display direction (horizontal|vertical|horizontalflipped)
 */
//$cfg['DefaultDisplay'] = 'vertical';


/**
 * How many columns should be used for table display of a database?
 * (a value larger than 1 results in some information being hidden)
 * default = 1
 */
//$cfg['PropertiesNumColumns'] = 2;

/**
 * Set to true if you want DB-based query history.If false, this utilizes
 * JS-routines to display query history (lost by window close)
 *
 * This requires configuration storage enabled, see above.
 * default = false
 */
//$cfg['QueryHistoryDB'] = true;

/**
 * When using DB-based query history, how many entries should be kept?
 *
 * default = 25
 */
//$cfg['QueryHistoryMax'] = 100;

/**
 * Should error reporting be enabled for JavaScript errors
 *
 * default = 'ask' 
 */
//$cfg['SendErrorReports'] = 'ask';

/*
 * You can find more configuration options in the documentation
 * in the doc/ folder or at <http://docs.phpmyadmin.net/>.
 */
?>

What changes do I need to do on this file? I’ve already followed up various posts but its not helping.
It this the problem with the domain being down?

Thanks in advance.

asked Feb 11, 2014 at 10:51

Phantom's user avatar

7

If you are using apache2.4 and PHP 7, run

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

then restart your server

sudo service apache2 restart

answered Apr 25, 2016 at 10:10

Fredrick Anyera M's user avatar

3

I know it has been a couple of years, and I noticed by your comments that still no luck. Here I run into the same 500 error after installing through apt.
I look for my Apache error log file (/var/log/apache2/error.log), and there was the following entry:

[Thu Aug 11 22:38:25.930453 2016] [:error] [pid 18138] [client ::1:35026] PHP Fatal error:  require_once(): Failed opening required '/usr/share/php/php-gettext/gettext.inc' (include_path='.:/usr/share/php') in /usr/share/phpmyadmin/libraries/select_lang.lib.php on line 477

It shows that the library gettext was not found, so I intalled it:

sudo apt-get install  php-gettext

And restarted Apache:

sudo service apache2 restart

That worked for me. Hope it helps.
PS: If still not working you may try to sym link the folder just in case:

sudo ln -s /usr/share/phpmyadmin /var/www/

answered Aug 11, 2016 at 20:58

Raúl's user avatar

RaúlRaúl

711 silver badge3 bronze badges

OK, if you have already installed packages php-mbstring and php-gettext and it still doesn’t work, first take a look to Apache logs:

tail /var/log/apache2/error.log

If you find something like this:

Fatal error: Uncaught Twig_Error_Syntax: Unexpected «apply» tag
(expecting closing tag for the «if» tag defined near line 17). in
/usr/share/phpmyadmin/templates/columns_definitions/column_virtuality.twig
on line 17

This is a known bug in phpmyadmin 4.9.4

The bug has been fixed in phpmyadmin 4.9.5 but please note that if you are under Debian 10 Buster you will need to upgrade the package php-twig to an higher version rather than the one included with Buster, or package phpmyadmin
will be kept back to 4.9.4 during system upgrades.

You can simply upgrade php-twig from next Debian version (11, Bullseye)

apt-get install php-twig/bullseye

This worked for me.
Hope this doesn’t broke something else in Deb 10 LAMP setup.

answered Apr 16, 2020 at 17:01

bytepan's user avatar

bytepanbytepan

3512 silver badges5 bronze badges

Ensure that your PHP version matches the used PHP module in Apache2:

php -v  //PHP 7.4.4 
ls -d /etc/apache2/mods-enabled/php*.conf // php7.3.conf

sudo a2dismod php7.3  // disable 7.3
sudo a2enmod php7.4   // enable 7.4
sudo systemctl restart apache2

I installed the php-mbstring php-gettext (also excplicitly for latest PHP version), but it still wasn’t working. At least it took me hours until I noticed apache decides itself what PHP version is used.

answered Apr 6, 2020 at 20:51

User Rebo's user avatar

User ReboUser Rebo

1,85121 silver badges29 bronze badges

After applying all the above mentioned solution, none worked for me.

This worked for me:

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] == ‘*’))

answered Jun 25, 2020 at 19:46

PrafulPravin's user avatar

if you want to access the mysql data from your server to your computer

you need to change

$cfg['Servers'][$i]['host'] = 'localhost';

to you server ip address.

$cfg['Servers'][$i]['host'] = 'your.server.ip.add.here';

update

$cfg['Servers'][$i]['AllowNoPassword'] = true;
$cfg['Servers'][$i]['host'] = 'your.server.ip.add.here';
$cfg['Servers'][$i]['user'] = 'db name here';
$cfg['Servers'][$i]['password'] = 'db password';

make sure that those fields are properly set up..

answered Feb 11, 2014 at 11:28

ibondoc22's user avatar

2

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

@williamdes after doing that test it still doesn’t work… Do I need to refresh something?

administrador@ubuntu-server-vm-22:/$ sudo apt show phpmyadmin
[sudo] password for administrador:
Package: phpmyadmin
Version: 4:5.1.3+dfsg1-1+jammy1
Priority: optional
Section: web
Maintainer: phpMyAdmin Packaging Team <team+phpmyadmin@tracker.debian.org>
Installed-Size: 36.8 MB
Depends: dbconfig-mysql | dbconfig-no-thanks | dbconfig-common (<< 2.0.0), libjs-bootstrap4, libjs-codemirror, libjs-jquery, libjs-jquery-mousewheel, libjs-jquery-timepicker, libjs-jquery-ui, php-cli, sensible-utils, ucf, debconf (>= 0.5) | debconf-2.0, php-common, php-json, php-mysql, php-xml, php-google-recaptcha (>= 1.1), php-google-recaptcha (<< 2~~), php-nikic-fast-route (>= 1.3), php-nikic-fast-route (<< 2~~), php-phpmyadmin-motranslator (>= 5.0), php-phpmyadmin-motranslator (<< 6~~), php-phpmyadmin-shapefile (>= 2.0), php-phpmyadmin-shapefile (<< 3~~), php-phpmyadmin-sql-parser (>= 5.4), php-phpmyadmin-sql-parser (<< 6~~), php-twig-i18n-extension (>= 3.0), php-twig-i18n-extension (<< 4~~), php-phpseclib (>= 2.0), php-phpseclib (<< 3~~), php-symfony-config (>= 4.4.9), php-symfony-config (<< 6~~), php-symfony-dependency-injection (>= 4.4.9), php-symfony-dependency-injection (<< 6~~), php-symfony-expression-language (>= 4.4.9), php-symfony-expression-language (<< 6~~), php-mbstring, php-twig (>= 2.9), php-twig (<< 4~~), php-mariadb-mysql-kbs (>= 1.2), php-mariadb-mysql-kbs (<< 2~~), libjs-sphinxdoc (>= 4.3)
Recommends: apache2 | lighttpd | httpd, php-bz2, php-curl, php-gd, php-tcpdf, php-zip
Suggests: default-mysql-server | virtual-mysql-server, php-recode, www-browser, php-opcache, php-gd2, php-pragmarx-google2fa-qrcode, php-code-lts-u2f-php-server, php-paragonie-sodium-compat
Download-Size: 5,020 kB
APT-Manual-Installed: yes
APT-Sources: https://ppa.launchpadcontent.net/phpmyadmin/ppa/ubuntu jammy/main amd64 Packages


enter image description hereIn Ubuntu 16.10 freshly installed LAMP server and installed PHPMYADMIN
when i open localhost/phpmyadmin I’m getting HTTP 500 error
PHP version 5.6
MySQL Version 14.14 Dist rib 5.7.16
Apache 2 version 2.4.18
and i have tried almost all the solutions that i got online none worked

Even if I install all of the other packages except this one and try to install phpmyadmin, it returns a 500 server error.

Thank you

asked Nov 2, 2016 at 10:20

BlackBerry's user avatar

BlackBerryBlackBerry

911 gold badge4 silver badges12 bronze badges

2

You should check your /etc/phpmyadmin/apache.conf.

Locate

php_admin_value open_basedir /usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/usr/share/php/php-php-gettext/:/usr/share/javascript/:/usr/share/php/tcpdf/:/usr/share/doc/phpmyadmin/:/usr/share/php/phpseclib/ in apache.conf.

Now change the /usr/share/php/php-php-gettext/ to /usr/share/php/php-gettext/

answered Dec 2, 2016 at 5:44

rajthakur's user avatar

rajthakurrajthakur

3793 silver badges13 bronze badges

2

Let’s try installing PhpMyAdmin dependencies. I presume you’re using PHP 7.

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

Then restart Apache:

sudo apache2 restart

Eliah Kagan's user avatar

Eliah Kagan

115k52 gold badges310 silver badges482 bronze badges

answered Nov 2, 2016 at 10:33

MKay's user avatar

MKayMKay

9231 gold badge8 silver badges22 bronze badges

2

Ура, наконец то! PROBLEM RESOLVED

просто надо было в файле /etc/php5/apache2/php.ini
memory_limit = 128M
заменить на более большую цифру
например: memory_limit = 512M

как починить phpmyadmin или как импортировать базы данных в формате sql в обход панели vestacp через консольные команды

после распаковки бекапа перестал открываться phpmyadmin

версия phpmyadmin на старом хостинге:
Информация о версии: 3.4.11.1deb2+deb7u1
версию на новом хосте не могу сказать, ибо не знаю где смотреть

имею debian 7 установленой на virtualbox подключенную к интернету через сетевой мост.
вручную положил файл admin.2015-09-07.tar в /home/backup
набрал команду
v-restore-user admin admin.2015-09-07.tar
установилось не сразу
исправил пару ошибок возникающих из за apache2 и паролем от mysql
в итоге все все установилось.

root@debian:# v-restore-user admin admin.2015-09-07.tar
— WEB —
2015-09-14 00:09:23 default.domain

— DNS —
2015-09-14 00:09:42 default.domain

— MAIL —
2015-09-14 00:09:42 default.domain

— DB —
2015-09-14 00:09:42 admin_******
2015-09-14 00:09:42 admin_******
2015-09-14 00:09:42 admin_******

— CRON —
2015-09-14 00:09:43 7 records

— USER DIR —
2015-09-14 00:09:43 tmp

теперь настала пора переносить базы данных не созданных ранее через vestacp. пытаюсь зайти в phpmyadmin
но при переходе по локальному ip адресу
http://192.168.100.4/phpmyadmin/
выдается ошибка 500
а при переходе по статическому внешнему ip
http://xx.xx.xx.xx/phpmyadmin/
выдается пустая страница

что я пробовал?

обшарил весь форум. очень многое перепробовал. перезагружался.

chmod 777 /var/lib/php/session
такой папки нет в debian 7. есть только
/var/lib/php5 пустая папка
/var/lib/phpmyadmin в которой нету папки session. есть только
blowfish_secret.inc.php права 640
config.inc.php права 640
выставления прав 644 не дало никакого результата

в /usr/share/phpmyadmin решил не копаться
ко всем php файлам стоят права 644

результаты поиска по ключевому слову phpmyadmin

root@debian:/# find */phpmyadmin
etc/phpmyadmin
etc/phpmyadmin/htpasswd.setup
etc/phpmyadmin/lighttpd.conf
etc/phpmyadmin/phpmyadmin.desktop
etc/phpmyadmin/config.header.inc.php
etc/phpmyadmin/config.inc.php
etc/phpmyadmin/phpmyadmin.service
etc/phpmyadmin/config-db.php_
etc/phpmyadmin/config.footer.inc.php
etc/phpmyadmin/apache.conf

у всех этих файлов права 644 кроме
htpasswd.setup 640
config-db.php_

почему на конце черточка _ я фиг знает
пробовал убрать ее. ничего не поменялось

как импортировать базы данных в формате sql в обход панели vestacp через консольные команды
источник:

как починить phpmyadmin или как импортировать базы данных в формате sql в обход панели vestacp через консольные команды

I have installed multiple version of PHP 5.6, 7.2, 7.3, 7.4 and 8.0 with 7.4 set as the default. I tried to switch to different version for some projects running on older version, doing this:

sudo update-alternatives --set php /usr/bin/php5.6

Then restart the apache by doing:

sudo service apache2 restart

And also did if switching to other version

sudo update-alternatives --config php

Then restarted Apache

But when I open to http://localhost/phpmyadmin again which was working recently, now its throwing error 500 then did check the error on /var/log/apache2/error.log and it says:

PHP message: PHP Warning: Unsupported declare ‘strict_types’ in /usr/share/php/PhpMyAdmin/MoTranslator/Loader.php on line 23nPHP message: PHP Parse error: syntax error, unexpected ‘?’ in /usr/share/php/PhpMyAdmin/MoTranslator/Loader.php on line 116n`

And created a file with phpinfo it it and printed the PHP version, it says php 5.6 but in CLI, by doing php -v it says php 7.4, below is the screenshot of the phpinfo()

enter image description here

Any help, ideas, are greatly appreciated.

Version:

  • OS lsb_release -a : Ubuntu 18.04.5 LTS
  • PHP php -v : 8.0.1
  • Apache apache2 -v : 2.4.29 (Ubuntu)
  • MySQL mysql --version : mysql Ver 14.14 Distrib 5.7.32

Problem:

I’m trying to install LAMP Stack using following article. However, I was getting HTTP 500 Error while accessing phpmyadmin from browser.

And installed phpmyadmin using below command.

  • sudo apt install phpmyadmin php-mbstring php-zip php-gd php-json php-curl

Tried :

So, I checked with Error Log tail -f /var/log/apache2/error.log and found that Phpmyadmin was running on depreciated version of PHP.

[Sat Jan 30 12:56:38.798871 2021] [php:error] [pid 17271] [client 
103.25.169.179:28514] PHP Fatal error:  Array and string offset access 
syntax with curly braces is no longer supported in 
/usr/share/phpmyadmin/libraries/Util.php on line 2087

[Sat Jan 30 12:56:38.798871 2021] [php:error] [pid 17271] [client 103.25.169.179:28514] PHP Fatal error:  Uncaught ValueError: 
mb_convert_encoding(): Argument #2 ($to_encoding) must be a valid 
encoding, "" given in /usr/share/php/php-php-
gettext/gettext.inc:181nStack trace:n#0 /usr/share/php/php-php-
gettext/gettext.inc(181): mb_convert_encoding()n#1 /usr/share/php/php-
php-gettext/gettext.inc(278): _encode()n#2 /usr/share/php/php-php-
gettext/gettext.inc(285): _gettext()n#3 
/usr/share/phpmyadmin/libraries/sanitizing.lib.php(179): __()n#4 
/usr/share/phpmyadmin/libraries/Message.php(607): PMA_sanitize()n#5 
/usr/share/phpmyadmin/libraries/Message.php(672): 
PMAlibrariesMessage::decodeBB()n#6 
/usr/share/phpmyadmin/libraries/Error.php(220): PMAlibrariesMessage-
>getMessage()n#7 /usr/share/phpmyadmin/libraries/ErrorHandler.php(193): 
PMAlibrariesError->getHash()n#8 
/usr/share/phpmyadmin/libraries/ErrorHandler.php(156): 
PMAlibrariesErrorHandler->addError()n#9 [internal function]: 
PMAlibrariesErrorHandler->handleError()n#10 
/usr/share/phpmyadmin/libraries/session.inc.php(133): ini_set()n#11 
/usr/share/phpmyadmin/libraries/common.inc.php(280): require('...')n#12 
/usr/share/phpmyadmin/index.php(13): require_once('...')n#13 {main}n  
thrown in /usr/share/php/php-php-gettext/gettext.inc on line 181

  • I’d solved Array and string offset access syntax error by removing { } with [ ]
  • Run the following command sudo phpenmod mbstring

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.

Hestia Control Panel - Discourse

Loading

WorldDelete

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


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

    более трёх лет назад

  • 4827 просмотров

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

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

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

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

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


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

04 июн. 2023, в 12:07

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

04 июн. 2023, в 12:06

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

04 июн. 2023, в 12:06

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

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

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

Assignees

@williamdes

Labels

bug

A problem or regression with an existing feature

duplicate

packaging

An issue that affect Debian, Ubuntu or another form of packaging

Comments

@EtienneDelepine

Describe the bug

Getting error 500 on these 2 pages, not the others.

Displays the message:
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.

To Reproduce

connect to PhpMyAdmin, go to a database page then a table page, click on «Structure» or «Tracking» tabs.

Server configuration

Debian 10 / Apache 2.4.38 / PHP 8.0.1 / mysqlnd 8.0.1 / PhpMyAdmin 5.0.4deb1~bpo10+1

Client configuration

Firefox and Chrome, Windows 10

@williamdes

Hi @EtienneDelepine
Could you send the full error ?

But I have an idea of what could be the error, please do apt remove phpmyadmin && apt install -t buster-backports phpmyadmin

@williamdes
williamdes

added

bug

A problem or regression with an existing feature

packaging

An issue that affect Debian, Ubuntu or another form of packaging

labels

Feb 7, 2021

@EtienneDelepine

Thank you for your help.
Do I have to remove the database as requested when removing phpmyadmin ?
"Deconfigure database for phpmyadmin with dbconfig-common?"

@williamdes

Thank you for your help.
Do I have to remove the database as requested when removing phpmyadmin ?
"Deconfigure database for phpmyadmin with dbconfig-common?"

Oh no, just say no and it will use it when you re-install the package. But to be safe you can choose to drop it
Let me know if it works and maybe also accept the solution on https://serverfault.com/a/1052702/336084 ;)

@EtienneDelepine

Unfortunately, I tried to uninstall keeping the database and reinstall (and reboot the system) but the problem was still there.

I tried removing everything and the database, reinstalling all, the database using /usr/share/phpmyadmin/sql/create_tables.sql, rename /usr/share/phpmyadmin/config.sample.inc.php into config.inc.php (add bloofish_secret to this file), saw the missing bloofish_secret message was still there, found that /var/lib/phpmyadmin/blowfish_secret.inc.php was not readable (chmod 640), put 644 and my passphrase in it. Restarted Apache.
But I’m still getting the same error for the 2 same pages.

Sorry for the post in Serverfault, I thought to use github issues after posting there.

@williamdes

Could you send me the actual PHP error in your webserver logs?

@EtienneDelepine

Last lines of /var/log/php8.0-fpm.log

[08-Feb-2021 10:47:31] WARNING: Found multiple addresses for localhost, 127.0.0.1 ignored
[08-Feb-2021 10:47:31] NOTICE: fpm is running, pid 24840
[08-Feb-2021 10:47:31] NOTICE: ready to handle connections
[08-Feb-2021 10:47:31] NOTICE: systemd monitor interval set to 10000ms

But phpmyadmin may be using another php mode ?

Last lines of /var/log/apache2/error.log
[Mon Feb 08 11:13:14.802887 2021] [mpm_prefork:notice] [pid 25199] AH00169: caught SIGTERM, shutting down
[Mon Feb 08 11:13:14.872349 2021] [suexec:notice] [pid 8831] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Mon Feb 08 11:13:14.889844 2021] [mpm_prefork:notice] [pid 8833] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1i configured — resuming normal operations
[Mon Feb 08 11:13:14.889867 2021] [core:notice] [pid 8833] AH00094: Command line: ‘/usr/sbin/apache2’

I looked at all *.log changes today on the server, I see nothing related to the problem

@williamdes

If you are using php 8.0 that could be where the issue is
Maybe you could send screenshots of the errors or something that could give me a clue of where the errors are 🤔

You have no buttons on the interface to show the error?

@EtienneDelepine

Last lines of /var/log/php8.0-fpm.log

[08-Feb-2021 10:47:31] WARNING: Found multiple addresses for localhost, 127.0.0.1 ignored
[08-Feb-2021 10:47:31] NOTICE: fpm is running, pid 24840
[08-Feb-2021 10:47:31] NOTICE: ready to handle connections
[08-Feb-2021 10:47:31] NOTICE: systemd monitor interval set to 10000ms

But phpmyadmin may be using another php mode ?

Last lines of /var/log/apache2/error.log

[Mon Feb 08 11:13:14.802887 2021] [mpm_prefork:notice] [pid 25199] AH00169: caught SIGTERM, shutting down
[Mon Feb 08 11:13:14.872349 2021] [suexec:notice] [pid 8831] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Mon Feb 08 11:13:14.889844 2021] [mpm_prefork:notice] [pid 8833] AH00163: Apache/2.4.38 (Debian) mod_fcgid/2.3.9 OpenSSL/1.1.1i configured -- resuming normal operations
[Mon Feb 08 11:13:14.889867 2021] [core:notice] [pid 8833] AH00094: Command line: '/usr/sbin/apache2'

I looked at all *.log changes today on the server, I see nothing related to the problem

@EtienneDelepine

@EtienneDelepine

Solution found!
I followed this Symfony bug solution symfony/symfony@8e34978 and made the modification (add array_value) on usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php and everything work now!

williamdes, Larionov-Yurii, maxlech974, mvl22, gilbertotoledo, christiancazu, LeMee, krishnahimself, avolpe1998, and Blekss reacted with thumbs up emoji
ibennetch, maxlech974, gilbertotoledo, christiancazu, and LeMee reacted with hooray emoji
maxlech974, gilbertotoledo, and christiancazu reacted with heart emoji
williamdes, maxlech974, and gilbertotoledo reacted with rocket emoji

@williamdes

Solution found!
I followed this Symfony bug solution symfony/symfony@8e34978 and made the modification (add array_value) on usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php and everything work now!

Perfect !
Be sure to update your serverfault post ;)

@williamdes

@williamdes
williamdes

changed the title
return error 500 for tbl_structure and tbl_tracking

PHP 8 — return error 500 for tbl_structure and tbl_tracking

Feb 8, 2021

@flobee

Solution found!
I followed this Symfony bug solution symfony/symfony@8e34978 and made the modification (add array_value) on usr/share/php/Symfony/Component/DependencyInjection/ContainerBuilder.php and everything work now!

Debain buster users should update the file (if root user available) or update the sympony packages from debian testing tree:

php-symfony-service-contracts (1.1.10-2) wird eingerichtet ...
php-symfony-config (4.4.19+dfsg-1) wird eingerichtet ...
php-symfony-dependency-injection (4.4.19+dfsg-1) wird eingerichtet ...

@see

  • https://serverfault.com/a/1052827
  • symfony/symfony@8e34978

Edit/Update: Still exists in some kind:
when delete recods (more than one (tbl_row_action.php)) of a last page the error comes up, when deleting at the first page all fine.

@williamdes

Hi !
The PPA now has 5.1 available, you can upgrade 🚀

But as I said on #16968 (comment) you will need to apply the patch on the symfony dependency-injection lib

@github-actions
github-actions
bot

locked as resolved and limited conversation to collaborators

Jun 19, 2022

Labels

bug

A problem or regression with an existing feature

duplicate

packaging

An issue that affect Debian, Ubuntu or another form of packaging

Понравилась статья? Поделить с друзьями:
  • Pluto b46 v2 ошибки
  • Plugin command контур ошибка
  • Pls input pwd ошибка терминала s90
  • Playstation произошла ошибка e 8210604a
  • Playstation ошибка su 30746 0