phpmyadmin stopped working

Discussion in 'Installation/Configuration' started by matthewobrn, Dec 24, 2017.

  1. matthewobrn

    matthewobrn New Member

    Firstly thanks to anyone who helps!

    I'm running a banana pi M3 running:
    (Debian Jessie) ISPConfig 3.1.9
    Debian GNU/Linux 8 (jessie)

    So the other day I did an update.
    apt-get update
    apt-get upgrade
    apt-get autoremove
    and ispconfig update

    Since the update phpmyadmin has stopped working. I'm getting a 404 error when I go to https://weburl/phpmyadmin and https://weburl:8080/phpmyadmin is returning a Not Found The requested URL /phpmyadmin was not found on this server.

    I went looking for the config files and checking they were present in /etc/apache2/conf-available and /etc/apache2/conf-enabled
    They were missing from both. I added the following symlinks (see below).

    I have also checked the alias is present for phpmyadmin and matches the one in the ispconfig page.

    ***Probably should have stopped here***
    After all of this I tried apt-get remove phpmyadmin --> apt-get install phpmyadmin
    It's still not working and I fear I have messed up all of ispconfig db access and settings.

    [email protected]:/etc/apache2/conf-available# ls -l
    total 32
    -rw-r--r-- 1 root root  228 Jan  3  2017 apache2-doc.conf
    -rw-r--r-- 1 root root  315 Jul  6  2016 charset.conf
    -rw-r--r-- 1 root root   73 Aug 25  2016 httpoxy.conf
    -rw-r--r-- 1 root root 3224 Jul  6  2016 localized-error-pages.conf
    -rw-r--r-- 1 root root  189 Jul  6  2016 other-vhosts-access-log.conf
    -rw-r--r-- 1 root root 1312 Jul 27  2016 php5-cgi.conf
    lrwxrwxrwx 1 root root   28 Dec 24 16:33 phpmyadmin.conf -> ../../phpmyadmin/apache.conf
    lrwxrwxrwx 1 root root   26 Aug 25  2016 roundcube.conf -> /etc/roundcube/apache.conf
    -rw-r--r-- 1 root root 2190 Jul 20  2016 security.conf
    -rw-r--r-- 1 root root  455 Jul  6  2016 serve-cgi-bin.conf
    [email protected]:/etc/apache2/conf-available# cd ../conf-enabled/
    [email protected]:/etc/apache2/conf-enabled# ls -l
    total 0
    lrwxrwxrwx 1 root root 34 Aug 25  2016 apache2-doc.conf -> ../conf-available/apache2-doc.conf
    lrwxrwxrwx 1 root root 30 Aug 25  2016 charset.conf -> ../conf-available/charset.conf
    lrwxrwxrwx 1 root root 30 Aug 25  2016 httpoxy.conf -> ../conf-available/httpoxy.conf
    lrwxrwxrwx 1 root root 44 Aug 25  2016 localized-error-pages.conf -> ../conf-available/localized-error-pages.conf
    lrwxrwxrwx 1 root root 46 Aug 25  2016 other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.conf
    lrwxrwxrwx 1 root root 33 Dec 24 16:34 phpmyadmin.php -> ../conf-available/phpmyadmin.conf
    lrwxrwxrwx 1 root root 32 Aug 25  2016 roundcube.conf -> ../conf-available/roundcube.conf
    lrwxrwxrwx 1 root root 31 Aug 25  2016 security.conf -> ../conf-available/security.conf
    lrwxrwxrwx 1 root root 36 Aug 25  2016 serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf

    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    IP-address(es) (as per ifconfig): ***.***.***.***, ***.***.***.***
    [WARN] ip addresses from hostname differ from ifconfig output. Please check your ip settings.
    [INFO] ISPConfig is installed.
    ##### ISPCONFIG #####
    ISPConfig version is 3.1.9
    ##### VERSION CHECK #####
    [INFO] php (cli) version is 5.6.30-0+deb8u1
    [INFO] php-cgi (used for cgi php in default vhost!) is version 5.6.30-0+deb8u1
    ##### PORT CHECK #####
    ##### MAIL SERVER CHECK #####
    [INFO] I found the following web server(s):
            Apache 2 (PID 10195)
    [INFO] I found the following mail server(s):
            Postfix (PID 7810)
    [INFO] I found the following pop3 server(s):
            Dovecot (PID 8053)
    [INFO] I found the following imap server(s):
            Unknown process (init) (PID 1)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 8191)
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [localhost]:10025               (7810/master)
    [localhost]:10026               (8050/amavisd-new)
    [anywhere]:3306         (7371/mysqld)
    [localhost]:10027               (7810/master)
    [anywhere]:587          (7810/master)
    [localhost]:11211               (630/memcached)
    [anywhere]:5900         (606/socat)
    [anywhere]:110          (8053/dovecot)
    [anywhere]:2222         (605/socat)
    [anywhere]:143          (1/init)
    [anywhere]:465          (7810/master)
    [anywhere]:21           (8191/pure-ftpd)
    ***.***.***.***:53              (610/named)
    ***.***.***.***:53              (610/named)
    [localhost]:53          (610/named)
    [anywhere]:22           (1077/sshd)
    [anywhere]:25           (7810/master)
    [localhost]:953         (610/named)
    [anywhere]:1883         (790/mosquitto)
    [anywhere]:58846                (604/socat)
    [anywhere]:993          (1/init)
    [anywhere]:995          (8053/dovecot)
    [localhost]:10023               (1199/
    [localhost]:10024               (8050/amavisd-new)
    *:*:*:*::*:10026                (8050/amavisd-new)
    *:*:*:*::*:587          (7810/master)
    [localhost]10           (8053/dovecot)
    [localhost]43           (1/init)
    *:*:*:*::*:8080         (10195/apache2)
    *:*:*:*::*:80           (10195/apache2)
    *:*:*:*::*:8081         (10195/apache2)
    *:*:*:*::*:465          (7810/master)
    *:*:*:*::*:21           (8191/pure-ftpd)
    *:*:*:*::*:53           (610/named)
    *:*:*:*::*:22           (1077/sshd)
    *:*:*:*::*:25           (7810/master)
    *:*:*:*::*:953          (610/named)
    *:*:*:*::*:443          (10195/apache2)
    [localhost]883          (790/mosquitto)
    *:*:*:*::*:993          (1/init)
    *:*:*:*::*:995          (8053/dovecot)
    *:*:*:*::*:10023                (1199/
    *:*:*:*::*:10024                (8050/amavisd-new)
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    If phpmyadmin configuration got messed up, removing and reinstalling won't repair configuration. Try
    dpkg-reconfigure phpmyadmin
    apt-get purge phpmyadmin
    apt-get install phpmyadmin
    If that does not help, check with
    apachectl -S
    what apache says about setups. Then try reading apache logs to see if there are errors. Also check with
    service apache2 status
    apache is running.
  3. matthewobrn

    matthewobrn New Member

    Tried the apt-get purge and install and it is still the same.

    apachectl -S
    [email protected]:/home/matthew# apachectl -S
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:73
    VirtualHost configuration:
    *:8081        (/etc/apache2/sites-enabled/000-apps.vhost:9)
    *:8080        (/etc/apache2/sites-enabled/000-ispconfig.vhost:9)
    *:80                   is a NameVirtualHost
             default server (/etc/apache2/sites-enabled/000-default.conf:1)
             port 80 namevhost (/etc/apache2/sites-enabled/000-default.conf:1)
             port 80 namevhost (/etc/apache2/sites-enabled/100-
             port 80 namevhost (/etc/apache2/sites-enabled/
    *:443         (/etc/apache2/sites-enabled/
    ServerRoot: "/etc/apache2"
    Main DocumentRoot: "/var/www/html"
    Main ErrorLog: "/var/log/apache2/error.log"
    Mutex ssl-cache: using_defaults
    Mutex default: dir="/var/lock/apache2" mechanism=fcntl
    Mutex mpm-accept: using_defaults
    Mutex fcgid-pipe: using_defaults
    Mutex authdigest-opaque: using_defaults
    Mutex watchdog-callback: using_defaults
    Mutex rewrite-map: using_defaults
    Mutex authdigest-client: using_defaults
    Mutex fcgid-proctbl: using_defaults
    Mutex ssl-stapling: using_defaults
    PidFile: "/var/run/apache2/"
    Define: DUMP_VHOSTS
    Define: DUMP_RUN_CFG
    User: name="www-data" id=33
    Group: name="www-data" id=33
    service apache2 status
    [email protected]:/home/matthew# service apache2 status
    ● apache2.service - LSB: Apache2 web server
       Loaded: loaded (/etc/init.d/apache2)
      Drop-In: /lib/systemd/system/apache2.service.d
       Active: active (running) since Sun 2017-12-24 16:57:49 AEDT; 1 day 5h ago
      Process: 10117 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
      Process: 6821 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
      Process: 10159 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/apache2.service
               ├─ 2581 /usr/sbin/apache2 -k start
               ├─ 2701 /usr/sbin/apache2 -k start
               ├─ 6894 vlogger (access log)
               ├─ 6896 /usr/sbin/apache2 -k start
               ├─ 6899 PassengerWatchdog
               ├─ 6906 PassengerHelperAgent
               ├─ 6919 PassengerLoggingAgent
               ├─ 6948 /usr/sbin/apache2 -k start
               ├─ 6949 /usr/sbin/apache2 -k start
               ├─ 6950 /usr/sbin/apache2 -k start
               ├─ 6952 /usr/sbin/apache2 -k start
               ├─10195 /usr/sbin/apache2 -k start
               ├─13616 /usr/sbin/apache2 -k start
               ├─20076 /usr/sbin/apache2 -k start
               ├─20077 /usr/sbin/apache2 -k start
               ├─20080 /usr/sbin/apache2 -k start
               ├─20083 /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
               ├─20084 /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
               ├─20088 /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
               └─20090 /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
    Dec 24 16:57:48 barrys apache2[10159]: Starting web server: apache2AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/0...nfig.conf:73
    Dec 24 16:57:49 barrys apache2[10159]: .
    Dec 24 16:57:49 barrys systemd[1]: Started LSB: Apache2 web server.
    Dec 25 06:40:19 barrys systemd[1]: Reloading LSB: Apache2 web server.
    Dec 25 06:40:20 barrys apache2[6821]: Reloading web server: apache2.
    Dec 25 06:40:21 barrys systemd[1]: Reloaded LSB: Apache2 web server.
    Hint: Some lines were ellipsized, use -l to show in full.
    apache error log
    [Mon Dec 25 06:40:21.732789 2017] [auth_digest:notice] [pid 10195] AH01757: generating secret for digest authentication ...
    [ 2017-12-25 06:40:21.7913 6899/b6f14000 agents/Watchdog/Main.cpp:538 ]: Options: { 'analytics_log_user' => 'nobody', 'default_group' => 'nogroup', 'default_python' => 'python', 'default_r$
    [ 2017-12-25 06:40:21.8380 6906/b6fe7220 agents/HelperAgent/Main.cpp:650 ]: PassengerHelperAgent online, listening at unix:/tmp/passenger.1.0.10195/generation-1/request
    [ 2017-12-25 06:40:21.9208 6919/b6fbc000 agents/LoggingAgent/Main.cpp:321 ]: PassengerLoggingAgent online, listening at unix:/tmp/passenger.1.0.10195/generation-1/logging
    [ 2017-12-25 06:40:21.9222 6899/b6f14000 agents/Watchdog/Main.cpp:728 ]: All Phusion Passenger agents started!
    [Mon Dec 25 06:40:22.222293 2017] [:error] [pid 10195] python_init: Python version mismatch, expected '2.7.5+', found '2.7.9'.
    [Mon Dec 25 06:40:22.225658 2017] [:error] [pid 10195] python_init: Python executable found '/usr/bin/python'.
    [Mon Dec 25 06:40:22.225726 2017] [:error] [pid 10195] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-arm-linux-gnueabihf:/usr/lib/python2.7/lib-tk:/usr/l$
    [Mon Dec 25 06:40:22.225802 2017] [:notice] [pid 10195] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Mon Dec 25 06:40:22.225856 2017] [:notice] [pid 10195] mod_python: using mutex_directory /tmp
    [Mon Dec 25 06:40:22.325303 2017] [mpm_prefork:notice] [pid 10195] AH00163: Apache/2.4.10 (Debian) mod_fcgid/2.3.9 Phusion_Passenger/4.0.53 mod_python/3.3.1 Python/2.7.9 OpenSSL/1.0.1t con$
    [Mon Dec 25 06:40:22.325452 2017] [core:notice] [pid 10195] AH00094: Command line: '/usr/sbin/apache2'
    [Mon Dec 25 06:40:22.325732 2017] [mpm_prefork:warn] [pid 10195] AH00167: long lost child came home! (pid 10198)
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So you did not do
    dpkg-reconfigure phpmyadmin
    If that does not return to a working phpmyadmin, check if you have altered apache configuration and try to undo those.
    Did you restart apache after changes?
  5. matthewobrn

    matthewobrn New Member

    I'm sorry I missed that step.
    It didn't help unfortunately.
    afaik the apache configs are unaltered.

    [email protected]:/home/matthew# dpkg-reconfigure phpmyadmin
    dbconfig-common: writing config to /etc/dbconfig-common/phpmyadmin.conf
    Replacing config file /etc/phpmyadmin/config-db.php with new version
    granting access to database phpmyadmin for [email protected]: already exists.
    creating database phpmyadmin: already exists.
    populating database via sql...  done.
    dbconfig-common: flushing administrative password
    # This is the main Apache server configuration file.  It contains the
    # configuration directives that give the server its instructions.
    # See for detailed information about
    # the directives and /usr/share/doc/apache2/README.Debian about Debian specific
    # hints.
    # Summary of how the Apache 2 configuration works in Debian:
    # The Apache 2 web server configuration in Debian is quite different to
    # upstream's suggested way to configure the web server. This is because Debian's
    # default Apache2 installation attempts to make adding and removing modules,
    # virtual hosts, and extra configuration directives as flexible as possible, in
    # order to make automating the changes and administering the server as easy as
    # possible.
    # It is split into several files forming the configuration hierarchy outlined
    # below, all located in the /etc/apache2/ directory:
    #    /etc/apache2/
    #    |-- apache2.conf
    #    |    `--  ports.conf
    #    |-- mods-enabled
    #    |    |-- *.load
    #    |    `-- *.conf
    #    |-- conf-enabled
    #    |    `-- *.conf
    #     `-- sites-enabled
    #        `-- *.conf
    # * apache2.conf is the main configuration file (this file). It puts the pieces
    #   together by including all remaining configuration files when starting up the
    #   web server.
    # * ports.conf is always included from the main configuration file. It is
    #   supposed to determine listening ports for incoming connections which can be
    #   customized anytime.
    # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
    #   directories contain particular configuration snippets which manage modules,
    #   global configuration fragments, or virtual host configurations,
    #   respectively.
    #   They are activated by symlinking available configuration files from their
    #   respective *-available/ counterparts. These should be managed by using our
    #   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
    #   their respective man pages for detailed information.
    # * The binary is called apache2. Due to the use of environment variables, in
    #   the default configuration, apache2 needs to be started/stopped with
    #   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
    #   work with the default configuration.
    # Global configuration
    # ServerRoot: The top of the directory tree under which the server's
    # configuration, error, and log files are kept.
    # NOTE!  If you intend to place this on an NFS (or otherwise network)
    # mounted filesystem then please read the Mutex documentation (available
    # at <URL:>);
    # you will save yourself a lot of trouble.
    # Do NOT add a slash at the end of the directory path.
    #ServerRoot "/etc/apache2"
    # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
    Mutex file:${APACHE_LOCK_DIR} default
    # PidFile: The file in which the server should record its process
    # identification number when it starts.
    # This needs to be set in /etc/apache2/envvars
    PidFile ${APACHE_PID_FILE}
    # Timeout: The number of seconds before receives and sends time out.
    Timeout 300
    # KeepAlive: Whether or not to allow persistent connections (more than
    # one request per connection). Set to "Off" to deactivate.
    KeepAlive On
    # MaxKeepAliveRequests: The maximum number of requests to allow
    # during a persistent connection. Set to 0 to allow an unlimited amount.
    # We recommend you leave this number high, for maximum performance.
    MaxKeepAliveRequests 100
    # KeepAliveTimeout: Number of seconds to wait for the next request from the
    # same client on the same connection.
    KeepAliveTimeout 5
    # These need to be set in /etc/apache2/envvars
    # HostnameLookups: Log the names of clients or just their IP addresses
    # e.g., (on) or (off).
    # The default is off because it'd be overall better for the net if people
    # had to knowingly turn this feature on, since enabling it means that
    # each client request will result in AT LEAST one lookup request to the
    # nameserver.
    HostnameLookups Off
    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here.  If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    ErrorLog ${APACHE_LOG_DIR}/error.log
    # LogLevel: Control the severity of messages logged to the error_log.
    # Available values: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the log level for particular modules, e.g.
    # "LogLevel info ssl:warn"
    LogLevel warn
    # Include module configuration:
    IncludeOptional mods-enabled/*.load
    IncludeOptional mods-enabled/*.conf
    # Include list of ports to listen on
    Include ports.conf
    # Sets the default security model of the Apache2 HTTPD server. It does
    # not allow access to the root filesystem outside of /usr/share and /var/www.
    # The former is used by web applications packaged in Debian,
    # the latter may be used for local directories served by the web server. If
    # your system is serving content from a sub-directory in /srv you must allow
    # access here, or in any related virtual host.
    <Directory />
        Options FollowSymLinks
        AllowOverride None
        Require all denied
    <Directory /usr/share>
        AllowOverride None
        Require all granted
    <Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride None
        Require all granted
    #<Directory /srv/>
    #    Options Indexes FollowSymLinks
    #    AllowOverride None
    #    Require all granted
    # AccessFileName: The name of the file to look for in each directory
    # for additional configuration directives.  See also the AllowOverride
    # directive.
    AccessFileName .htaccess
    # The following lines prevent .htaccess and .htpasswd files from being
    # viewed by Web clients.
    <FilesMatch "^\.ht">
        Require all denied
    # The following directives define some format nicknames for use with
    # a CustomLog directive.
    # These deviate from the Common Log Format definitions in that they use %O
    # (the actual bytes sent including headers) instead of %b (the size of the
    # requested file), because the latter makes it impossible to detect partial
    # requests.
    # Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
    # Use mod_remoteip instead.
    LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
    LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %O" common
    LogFormat "%{Referer}i -> %U" referer
    LogFormat "%{User-agent}i" agent
    # Include of directories ignores editors' and dpkg's backup files,
    # see README.Debian for details.
    # Include generic snippets of statements
    IncludeOptional conf-enabled/*.conf
    # Include the virtual host configurations:
    IncludeOptional sites-enabled/
    # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Have you used only httpS urls? Is error the same with http url? Can you see the session in Apache access log? Is there any bug report for raspbian(?) On phpmyadmin? If you run apt-get upgrade now, does it do anything?
  7. matthewobrn

    matthewobrn New Member

    Thanks for all your help with this.
    I have a rewrite on http --> https within the ispconfig redirect page for that domain.
    Here is the other_vhosts_access.log entry for /phpmyadmin
    I tried turning off the https redirect and trying but I'm getting the same results.
    apt-get upgrade didn't do anything.
    Code: - - [26/Dec/2017:17:11:16 +1100] "GET /phpmyadmin HTTP/1.1" 404 2298 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36"
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Does doing
    a2enconf phpmyadmin
    service apache2 reload
    change anything?
    If not, try setting up phpadmin from clean slate once more.
    apt-get purge phpmyadmin
    Check phpmyadmin files have indeed disappeared from all /etc/apache/*-available/ directories. Then apt-get install phpmyadmin, and check what you answer if it asks any questions during install.
  9. matthewobrn

    matthewobrn New Member

    Hi Taleman

    The first set of commands did the trick. I had to tweak the config-db.php once the site started loading.

    It's all back up and running. Thanks again.

Share This Page