sql >> Base de Datos >  >> Database Tools >> phpMyAdmin

PHPMyAdmin 500 Error interno del servidor en Apache debido a la versión de PHP

Importante:

Cambie el número de versión para obtener más seguridad si tiene phpMyAdmin expuesto al público o si necesita funciones de versiones más recientes de phpMyAdmin.

Esto fue tomado de un chat. Algunas cosas pueden ser inexactas, pero esto resolvió el problema del OP

Instale PHPMyAdmin usando el siguiente tutorial:

1.

apt purge phpmyadmin -y
cd /path/to/somefolder
wget https://files.phpmyadmin.net/phpMyAdmin/5.1.0-rc1/phpMyAdmin-5.1.0-rc1-all-languages.zip && unzip phpMyAdmin-5.1.0-rc1-all-languages.zip && 
cd phpMyAdmin-5.1.0-rc1-all-languages
apt install pwgen -y
  1. Tome nota de la salida de este comando, me referiré a él como pw
pwgen -s 32 1
cp config.sample.inc.php config.inc.php
  1. Edite config.inc.php con el editor favorito y pegue el pw en esta línea:
. . .
$cfg['blowfish_secret'] = 'STRINGOFTHIRTYTWORANDOMCHARACTERS'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
. . .
vim /etc/apache2/conf-available/phpmyadmin-custom.conf
  1. Pegue lo siguiente a ese comando anterior:
Alias /phpmyadmin /path/to/that/phpMyAdmin-5.1.0-rc1-all-languages
<Directory "/path/to/that/phpMyAdmin-5.1.0-rc1-all-languages">
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
Require all granted
</Directory>
  1. Guarda el anterior usando :wq , Ejecute el siguiente comando
a2enconf phpmyadmin-custom && systemctl restart apache2 && mysql
  1. Reemplace your_password_here a su propia contraseña.
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password_here';
systemctl restart mysql

Debería funcionar ahora.

Notas adicionales:

Para permitirle solo ver phpMyAdmin, intente:

<Directory "/path/to/that/phpMyAdmin-5.1.0-rc1-all-languages">
Options SymLinksIfOwnerMatch
DirectoryIndex index.php
Require local
# Or change it to
# Require ip 127.0.0.1
# change 127.0.0.1 to your personal computers ip address,
# not to the server ip
# if you want to access phpMyAdmin from a public server, but not allow others to access it
</Directory>