IsaacBen's avatar

phpmyadmin with PHP7

I have my website on digitalocean with PHP7. I tried to install phpmyadmin and I get errors with some missing packages. Is it currently not possible to use phpmyadmin with PHP7?

0 likes
9 replies
IsaacBen's avatar

@kenmoini

The following packages have unmet dependencies: phpmyadmin : Depends: libapache2-mod-php5 but it is not going to be installed or libapache2-mod-php5filter but it is not going to be installed or php5-cgi but it is not going to be installed or php5-fpm but it is not going to be installed or php5 but it is not going to be installed Depends: php5-mysql but it is not going to be installed or php5-mysqli but it is not installable or php5-mysqlnd but it is not going to be installed Depends: php5-mcrypt but it is not going to be installed Depends: php5-json but it is not going to be installed Depends: php-gettext but it is not going to be installed Recommends: php5-gd but it is not going to be installed E: Unable to correct problems, you have held broken packages.

IsaacBen's avatar

I used this command to install which worked well on PHP5 sudo apt-get install phpmyadmin

bashy's avatar
bashy
Best Answer
Level 65

I wouldn't install PMA like that.

Clone the repo and keep a script to update it regularly.

git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git

Script to run on CRON

#!/bin/bash

cd /home/sites/phpmyadmin/
git pull -q origin STABLE

CRON

# Automatically upgrade PHPMyAdmin daily (5am)
0 5 * * * /home/user/scripts/pma_update.sh >> /dev/null 2>&1
4 likes
IsaacBen's avatar

@bashy Clone it where? Can you please elaborate. I'm not good at server management. The git clone should be entered in the server?

bashy's avatar

This would be done on the server and you can setup a site for it.

You can create a new vhost in Nginx or just use a default one (on the IP or host) if you have one.

# MySQL
location /mysql {
    index index.php index.html;
    auth_basic "Login";
    auth_basic_user_file /home/sites/htpasswd_mysql;
}

There's no exact way. It depends on your server setup. If you use Forge, you can probably do this all within that system itself.

IsaacBen's avatar

Well I think this is the time to read the NGINX book I have. I feel useless on these servers. Thanks for the help

IsaacBen's avatar

@bashy Hey, this is what I did. At first I just cloned it and it didn't work, then I cd /home/forge/default/public and cloned it there and it works now. I will probably change the route to secure it, but is that okay do you think? I mean it works and I can see the tables and everything.

bashy's avatar

@IsaacBen Yeah make sure you clone it where you want it. Normally either where the default folder is or as a new folder :)

1 like

Please or to participate in this conversation.