phpmyadmin not working

Discussion in 'Installation/Configuration' started by FredZ, Jun 11, 2019.

  1. FredZ

    FredZ Member

  2. CreeWarrior

    CreeWarrior Member

  3. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    As @CreeWarrior indicates, it's very unclear what url you are using when you 'navigate to phpmyadmin'. Ie. is phpmyadmin itself not working, or did you configure a bad phpmyadmin url under System > Main Config? Did phpmyadmin work with the default system php version, then you later added php versions and it stopped working? Does php work for your websites other than with phpmyadmin?

    FWIW, I did a manual install following the Perfect Server guides (not automated) and followed the other guide to add more php versions, and phpmyadmin does work on debian 9. It might even work on all websites out of the box, iirc, though I'm using 'https://[SERVERNAME]/phpmyadmin' for the phpmyadmin url.
     
    CreeWarrior likes this.
  4. FredZ

    FredZ Member

  5. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    What do you have for your default php interpreter in apache? (That assumes the automated install script installs apache, not nginx, which I do not know.)

    Eg. what output do you get for 'apachectl -M | grep php' and 'apachectl -t -D DUMP_INCLUDES | grep php' ? As an example, I have php7.1-fpm as the default php on a debian 9 server (note the officially supported version would be 7.0 on debian 9; I have been using 7.1 for some time with no issues, and fully aware that there could be, and to switch to 7.0 before reporting any related issues):
    Code:
    root@host:~# apachectl -M | grep php                                                                                                      
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73
    
    root@host:~# apachectl -t -D DUMP_INCLUDES | grep php                                                                                      
        (222) /etc/apache2/conf-enabled/php7.1-fpm.conf
        (222) /etc/apache2/conf-enabled/phpmyadmin.conf
        (222) /etc/apache2/conf-enabled/phpmyadmin_redirect.conf
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73
    
    Of that, phpmyadmin_redirect.conf is local config, phpmyadmin.conf is from the debian package.
     
  6. FredZ

    FredZ Member

    apachectl -M | grep php
    [Wed Jun 12 14:30:34.161952 2019] [so:warn] [pid 24317] AH01574: module php7_module is already loaded, skipping
    [Wed Jun 12 14:30:34.162108 2019] [so:warn] [pid 24317] AH01574: module php7_module is already loaded, skipping
    [Wed Jun 12 14:30:34.162168 2019] [so:warn] [pid 24317] AH01574: module php7_module is already loaded, skipping
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73
    php5_module (shared)
    php7_module (shared)

    apachectl -t -D DUMP_INCLUDES | grep php
    (146) /etc/apache2/mods-enabled/php5.6.load
    (146) /etc/apache2/mods-enabled/php7.0.load
    [Wed Jun 12 14:32:39.657682 2019] [so:warn] [pid 24410] AH01574: module php7_module is already loaded, skipping
    [Wed Jun 12 14:32:39.657827 2019] [so:warn] [pid 24410] AH01574: module php7_module is already loaded, skipping
    (146) /etc/apache2/mods-enabled/php7.1.load
    [Wed Jun 12 14:32:39.657896 2019] [so:warn] [pid 24410] AH01574: module php7_module is already loaded, skipping
    (146) /etc/apache2/mods-enabled/php7.2.load
    (146) /etc/apache2/mods-enabled/php7.3.load
    (147) /etc/apache2/mods-enabled/php5.6.conf
    (147) /etc/apache2/mods-enabled/php7.0.conf
    (147) /etc/apache2/mods-enabled/php7.1.conf
    (147) /etc/apache2/mods-enabled/php7.2.conf
    (147) /etc/apache2/mods-enabled/php7.3.conf
    (222) /etc/apache2/conf-enabled/phpmyadmin.conf
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73

    I have no idea what this means, but you don't need to be smart to notice that several of the entries appear twice. But I have no idea if this is an issue or is the issue. And if it is the issue how to fix it.

    Regards

    Fred
     
  7. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    That looks like you have all versions of mod_php trying to load, you should pick just one and uninstall the others. Or better yet, uninstall them all and don't use mod_php, if you don't need it (I've been running with php-fpm as the default php interpreter in apahce for a year or two, with no issues whatsoever).

    Commands to do so should be (disable all php_mod versions):
    Code:
    a2dismod php5.6
    a2dismod php7.0
    a2dismod php7.1
    a2dismod php7.2
    a2dismod php7.3
    
    Just leave one of those commands out (or run a2enmod if too late) if you want a mod_php enable, or if you could enable a php-fpm version with something like:
    Code:
    a2enconf php7.0-fpm
    And you might want to uninstall the mod_php versions you're not using (obviously don't uninstall the version you left enabled if you didn't disable them all):
    Code:
    apt-get remove libapache2-mod-php5 libapache2-mod-php7.0 libapache2-mod-php7.1 libapache2-mod-php7.2 libapache2-mod-php7.3

    If you leave both a mod_php and php-fpm version enabled, iirc the mod_php version is used, but you might want to disable the one you don't want to use just to avoid confusion. Restart apache when you're done.
     
  8. FredZ

    FredZ Member

    I really appreciate that. Your suggestion worked with only 7.0 enabled as all sites still function and I can now access phpmyadmin.

    Regards

    Fred
     

Share This Page