damir
By:
damir

phpmyadmin install error on NGINX with PHP 7.0

December 29, 2015 3k views
Nginx PHP LEMP

Hi,

I tried to install phpmyadmin through apt-get install phpmyadmin but recieved the following errors.

What am I missing here?

Best regards.

1 Answer

Hey @damir,

Which repository have you added to your Droplet in order to get PHP7 running? It looks like the phpmyadmin package you're trying to install is from the default repo, which expects PHP5.

If the repository you added doesn't provide a phpmyadmin package updated for PHP7, you may need to install it manually or by using Composer.

Best,
Eris
Platform Support Specialist

  • Hi @Eris,

    I followed this tutorial https://bjornjohansen.no/upgrade-to-php7 and I guess the repository is `add-apt-repository ppa:ondrej/php-7.0?

    Do we know when it will be possible to use apt-get install phpmyadmin instead of manual install?

    Best regards.

    • Hi @damir,

      I understand. The repository/ppa you've added is maintained by Ondřej Surý (we recommend the same one), while the phpmyadmin package is coming from the default repository. Looking at the ppa it doesn't look like he's updated the phpmyadmin package, so you won't be able to install it using your package manager.

      You will need to install it manually, which is what I'd recommend in the first place.

      A user named "Bashy" explained an easy way to install phpmyadmin and keep it up to date. Check out their answer on the Laracasts community.

      Best,
      Eris
      Platform Support Specialist

      • Hi @Eris,

        Thank you for your feedback. I wonder where do I clone the phpmydmin? I mean in what folder on the server do I clone it into?

        On my other servers I have seen folders of phpmyadmin in /etc/phpmyadmin and in /usr/share/phpmyadmin.

        I am a little bit confused of where to put the phpmyadmin clone?

        Best regards.

        • Hello,

          You'll want to either clone it into your webserver's document root (so it creates a new folder), or you can clone it elsewhere and create a virtualhost that takes care of that directory.

          The official docs recommend extracting or cloning to your webserver's root: for example /var/www/html. However, I do not recommend this unless you have a password set to protect that directory in either an .htaccess file or your webserver's configuration file.

          This guide explains how to set up password authentication to help protect phpmyadmin, which I highly recommend. You may also want to set it up so that only your home IP can access that folder as well. This guide contains some examples on how you can do that.

          Best,
          Eris
          Platform Support Specialist

          When setting up a web server, there are often sections of the site that you wish to restrict access to. Web applications often provide their own authentication and authorization methods, but the web server itself can be used to restrict access if these are inadequate or...
          • Hi @Eris,

            Hope you have had some great winter holiday.

            I have followed the answer of Bashy and I have managed to clone the phpmyadmin files to /etc/phpmyadmin folder on my server and I created a cron job as Bashy explained and it works.

            I managed also to create a symlink in the root of my website and now I can see the phpmyadmin login page.

            The issue I have now is that how do I create password and a username so I can login to phpmyadmin? How do I do a mcrypt and a dbconfig-common manually?

            Best regards.

            EDIT:
            I have managed to fix the issues! I can now login :)

Have another answer? Share your knowledge.