简体   繁体   中英

How to install latest phpmyadmin on ubuntu nginx server

I have installed phpmyadmin on ubuntu server using php81,

When i access the phpmyadmin on my browser I kept getting deprecation notice as shown below


Deprecation Notice in ./libraries/classes/Url.php#221
 http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated

I'm running ubuntu 20.04

Following lots of research, I found out that the only way out is to install phpmyadmin 5 which is currently the latest version

But the problem is that following this answer

sudo apt-get install phpmyadmin=5.1.1

Gives the following error

E: Version '5.1.1' for 'phpmyadmin' was not found

Is there anything I can do to get the latest phpmyadmin on my ubuntu server

As far as i can seee the latest version for phpmyadmin available for focal (Ubuntu 20.04) is 4.9.5: https://packages.ubuntu.com/focal/phpmyadmin

You could do any of the following:

Download and Install phpMyAdmin on Ubuntu 20.04 #sudo apt install phpmyadmin press enter without apache2 lighttpd

You can use the following command to log into MariaDB server. #sudo mysql -u root show grants for phpmyadmin@localhost;

Create Nginx Server Block for phpMyAdmin sudo nano /etc/nginx/conf.d/phpmyadmin.conf

server { listen 80; listen [::]:80; server_name pma.example.com; root /usr/share/phpmyadmin/; index index.php index.html index.htm index.nginx-debian.html;

access_log /var/log/nginx/phpmyadmin_access.log; error_log /var/log/nginx/phpmyadmin_error.log;

location / { try_files $uri $uri/ /index.php; }

location ~ ^/(doc|sql|setup)/ { deny all; }

location ~.php$ { fastcgi_pass unix:/run/php/php7.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; include snippets/fastcgi-php.conf; }

location ~ /.ht { deny all; } }

enter code here

#sudo nginx -t #sudo systemctl reload nginx

pma.example.com

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM