-1

I am completely new with ubuntu OS. I have installed nginx server, PHP 7.0.5 and MySQL Server version 5.7.12 in my local machine by googling. Now I want to install PHPMyAdmin. But I havnt found enough information about PHPMyAdmin installation. Found some commands on the internet.

sudo php5enmod mcrypt
sudo service php5-fpm restart

But when I run these commands, the terminal says command not found because I am using PHP7.

Alexandre Neukirchen
  • 2,713
  • 7
  • 26
  • 36
Noob Coder
  • 2,816
  • 8
  • 36
  • 61
  • Have you tried `sudo php7enmod mcrypt` and `sudo service php7-fpm restart`? – Matt C Apr 29 '16 at 05:21
  • Perhaps you misses the manual http://docs.phpmyadmin.net/en/latest/setup.html which has sections on "Quick install" from source or git, plus information on where to find the PPA? – Isaac Bennetch Apr 29 '16 at 14:07

3 Answers3

2

if you are using nginx, i suggest you download the file from https://www.phpmyadmin.net/downloads/ and extract it anywhere you want.

after that just make a configuration on your nginx (the default is /etc/nginx/sites-enable/default), something like:

server {
        listen   80; ## listen for ipv4
        server_name  phpmyadmin.x; ##change it as you wish
        root   /var/www/sites/phpmyadmin; ##path to your phpmyadmin directory

        index  index.php;

    location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php5-fpm.sock; ##just adjust with php7 version
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /var/www$fastcgi_script_name;
                include         fastcgi_params;
        fastcgi_read_timeout 300;
        }
        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
                deny  all;
        }
}

then edit your /etc/hosts and add phpmyadmin.x (change it if you want) on 127.0.0.1

restart your nginx. (service nginx restart)

make sure you already install php7 lib for mysql. maybe php7-mysql or something like that. and then restart the php-fpm

Andi R
  • 112
  • 2
  • 13
  • for me **fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;** will fix "File not found" while trying to implement this. – Mudita Wijaya May 24 '19 at 08:02
1

John Doe's link would probly do the trick another reference you can look at is https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-on-ubuntu-16-04. It's updated for Ubuntu 16.04

0

Your question has already been answered over at:

Have trouble installing phpmyadmin on PHP7 Apache/2.4.7 (Ubuntu)

Best of luck.

Community
  • 1
  • 1
John Doe
  • 158
  • 10