S
S
speedvm2022-04-12 12:24:35
Nginx
speedvm, 2022-04-12 12:24:35

Why is phpmyadmin showing a blank page?

Hi all!

On the server we have nginx 1.20.2, php 8.1.2 and mysql 8.0.23. I want to start phpmyadmin 5.1.3.

php fpm config
[pma.domain.com]
user = nginx
group = nginx
listen = /run/php/php8.1-fpm-pma.domain.com.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
pm = ondemand
pm.max_children = 10
pm.process_idle_timeout = 10s
pm.max_requests = 10

php_admin_value[upload_tmp_dir] = "/opt/phpmyadmin/tmp"
php_admin_value[session.save_path] = "/opt/phpmyadmin/session"
php_admin_value[open_basedir] = "/opt/phpmyadmin/"
php_admin_value[cgi.fix_pathinfo] = 0

nginx config
server {
  listen 80;
  server_name pma.domain.com;
  return 301 https://pma.domain.com$request_uri;
}

server {
  listen 443 ssl http2;
  server_name pma.domain.com;
  root /opt/phpmyadmin;
  access_log /var/log/nginx/pma.domain.com.access.log;
  error_log /var/log/nginx/pma.domain.com.error.log warn;
  index index.php;

  ssl_certificate /etc/nginx/ssl/pma.domain.com.crt;
  ssl_certificate_key /etc/nginx/ssl/pma.domain.com.key;
  add_header Strict-Transport-Security "max-age=31536000";
  ssl_ciphers ECDHE:!TLSv1;

  location ~* \.(js|css|png|jpg|jpeg|gif|ico|webp)$ {
    log_not_found off;
  }

  location ~ \.php$ {
    fastcgi_pass unix:/run/php/php8.1-fpm-pma.domain.com.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
}

phpmyadmin config
<?php
declare(strict_types=1);

$cfg['blowfish_secret'] = 'USZlR6ukWmKO5HXVEYvuKD0ODjB7xSds';

$i = 0;
$i++;

$cfg['Servers'][$i]['auth_type'] = 'cookie';

$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;

$cfg['Servers'][$i]['controlhost'] = '';
$cfg['Servers'][$i]['controlport'] = '';
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = 'passwd';

$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]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';

$cfg['TempDir'] = '/opt/phpmyadmin/tmp'

$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

$cfg['DefaultLang'] = 'ru';

Unpacked phpMyAdmin-5.1.3-all-languages.tar.gz to /opt/, made a symlink phpmyadmin -> phpMyAdmin-5.1.3-all-languages.
In mysql, I created a pma user with a password from the phpmyadmin config, fed the mysq script /opt/phpmyadmin/sql/create_tables.sql. I checked the connection to mysql by the pma user in the console - successfully.
There are no errors in error.log. In access.log only this:
[12/Apr/2022:12:21:39 +0300] "GET / HTTP/2.0" 200 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36"

PHP scripts work because if you write phpinfo() in index.php, then phpinfo is displayed.

I don't know where to dig further. Good people, help in any way you can...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
speedvm, 2022-04-12
@speedvm

There was no semicolon at the end of this line in phpmyadmin config (config.inc.php):
$cfg['TempDir'] = '/opt/phpmyadmin/tmp'
I.e. should be like this:
$cfg['TempDir'] = '/opt/phpmyadmin/tmp';

A
Alexander Karabanov, 2022-04-12
@karabanov

Because an unhandled exception occurred. Look in error.log, I suspect some extension is missing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question