Upgrade from Debian 10 to Debian 11 Apache PHP mismatch

Discussion in 'Installation/Configuration' started by mezelf, Aug 29, 2024.

  1. mezelf

    mezelf Member

    Hi,
    I have updated my Debian 10 to Debian 11 by following the instuctions on How to Upgrade from Debian 10 to Debian 11. During the upgrade, I chose to accept the new jk-init.ini. After the reboot, I tried to run ISPConfig but it failed. When I checked the logs, I saw that Apache2 was not starting because it was still looking for PHP 7.3 libraries. and afterwards started with Update the ISPConfig Perfect Server from Debian 10 to Debian 11 . When I came to step '5. Update paths to use PHP 7.4 as default PHP version', I could not run ISPConfig. When I checked the logs, I realized that the Apache2 version 2.4.61 was still looking for older PHP version and failing. Have I done something obvious in Upgrade from Debian 10 to Debian 11? Thanks in advice for any ideas!
    Regards.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you run an ISPConfig update with reconfigure services = yes after each of the two updates?
     
    mezelf likes this.
  3. mezelf

    mezelf Member

    Thanks a lot for your reply!
    Do you mean the Step '4. Run a force update of ISPConfig' in Update the ISPConfig Perfect Server from Debian 10, ? If so, I have run
    ispconfig_update.sh --force .
    regards.
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    mezelf likes this.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, that's what I meant. Which error do you get when you access the ISPConfig GUI (in the browser) and which error do you get in the global Apache or Nginx error.log?

    Moved your post to the ISPConfig forum now.
     
    mezelf and ahrasis like this.
  6. mezelf

    mezelf Member

    My apologies!
    Code:
    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] OS version is Debian GNU/Linux 11 (bullseye) 
    [INFO] uptime:  18:04:27 up  3:26,  1 user,  load average: 0.73, 0.28, 0.10
    [INFO] memory:
                   total        used        free      shared  buff/cache   available
    Mem:           3.8Gi       2.7Gi       254Mi        69Mi       928Mi       895Mi
    Swap:          974Mi       386Mi       588Mi
     
    [INFO] systemd failed services status:
      UNIT            LOAD   ACTIVE SUB    DESCRIPTION
    ● amavis.service  loaded failed failed Interface between MTA and virus scanner/content filters
    ● apache2.service loaded failed failed The Apache HTTP Server
    
    LOAD   = Reflects whether the unit definition was properly loaded.
    ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
    SUB    = The low-level unit activation state, values depend on unit type.
    2 loaded units listed.
    
    [INFO] ISPConfig is installed.
    
    ##### ISPCONFIG #####
    ISPConfig version is 3.2.12p1
    ##### VERSION CHECK #####
    [INFO] php (cli) version is 7.4.33
    [INFO] php-cgi (used for cgi php in default vhost!) is version 7.4.33
    
    ##### PORT CHECK #####
    
    [WARN] Port 8080 (ISPConfig) seems NOT to be listening
    [WARN] Port 8081 (ISPConfig Apps) seems NOT to be listening
    [WARN] Port 80 (Webserver) seems NOT to be listening
    [WARN] Port 443 (Webserver SSL) seems NOT to be listening
    
    ##### MAIL SERVER CHECK #####
    
    ##### RUNNING SERVER PROCESSES #####
    
    [WARN] I could not determine which web server is running.
    [INFO] I found the following mail server(s):
            Postfix (PID 1026)
    [INFO] I found the following pop3 server(s):
    
    ...skipping 1 line
    [INFO] I found the following imap server(s):
            Dovecot (PID 694)
    [INFO] I found the following ftp server(s):
            PureFTP (PID 818)
    
    ##### LISTENING PORTS #####
    (only           ()
    Local           (Address)
    [localhost]:631         (561/cupsd)
    [anywhere]:25           (1026/master)
    [localhost]:953         (565/named)
    [anywhere]:993          (694/dovecot)
    [anywhere]:995          (694/dovecot)
    [localhost]:10023               (663/postgrey)
    [localhost]:10025               (1026/master)
    [localhost]:3306                (159215/mariadbd)
    [localhost]:10027               (1026/master)
    [anywhere]:587          (1026/master)
    [localhost]:11211               (564/memcached)
    [anywhere]:110          (694/dovecot)
    [anywhere]:143          (694/dovecot)
    [anywhere]:465          (1026/master)
    ***.***.***.***:53              (565/named)
    [anywhere]:21           (818/pure-ftpd)
    [localhost]:53          (565/named)
    [anywhere]:22           (681/sshd:)
    *:*:*:*::*:631          (561/cupsd)
    *:*:*:*::*:25           (1026/master)
    *:*:*:*::*:953          (565/named)
    *:*:*:*::*:993          (694/dovecot)
    *:*:*:*::*:995          (694/dovecot)
    *:*:*:*::*:10023                (663/postgrey)
    *:*:*:*::*:587          (1026/master)
    [localhost]10           (694/dovecot)
    [localhost]43           (694/dovecot)
    *:*:*:*::*:465          (1026/master)
    [localhost]716          (1422/kdeconnectd)
    *:*:*:*::*:21           (818/pure-ftpd)
    *:*:*:*::*:53           (565/named)
    *:*:*:*::**:*:*:*::*53          (565/named)
    *:*:*:*::*:22           (681/sshd:)
    
    ##### IPTABLES #####
    
    ...skipping 1 line
    acme.sh is installed in /root/.acme.sh/acme.sh
    
    regards.
     
  7. mezelf

    mezelf Member

    Thank you for your reply.
    I do not think that my problem is related to ISPConfig. I think I have an Apache2 problem due to Debian-10 to 11 upgrade. When I typed localhost://8080 in the browser, I get blank screen with "Firefox can’t establish a connection to the server at localhost:8080". I think it does so because Apache2 does not start. When I check the logs, I see that Apache2 is looking for old version of PHP:
    When I restart Apache2 on command line, the journalctl output has:
    Code:
    Aug 29 17:58:01 myHost CRON[169227]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
    Aug 29 17:58:01 myHost CRON[169226]: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)
    Aug 29 17:58:01 myHost CRON[169229]: (root) CMD (/usr/local/ispconfig/server/server.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Aug 29 17:58:01 myHost CRON[169230]: (root) CMD (/usr/local/ispconfig/server/cron.sh 2>&1 | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done)
    Aug 29 17:58:01 myHost apachectl[169231]: apache2: Syntax error on line 146 of /etc/apache2/apache2.conf: Syntax error on line 3 of /etc/apache2/mods-enabled/php7.3.load: Cannot load /usr/lib/apache2/modules/libphp7.3.so into server: /us>
    Aug 29 17:58:01 myHost apachectl[169224]: Action 'start' failed.
    Aug 29 17:58:01 myHost apachectl[169224]: The Apache error log may have more information.
    Aug 29 17:58:01 myHost systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    
    This was also the situation after the first step: Upgrade from Debian 10 to Debian 11 . What happened is, during the execution of full upgrade (apt-get full-upgrade -y) step, the Screen Saver has crushed on me. I followed the instructions to unlock it. When I unlocked it, I entered the command apt-get full-upgrade -y again. But it complained that there was already a process running. I was not sure if it was really running in the background or hanging. After a while, I killed it and reissued apt-get full-upgrade -y. It seemed to complete normally. I wonder if something went wrong there.

    regards.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run:

    rm /etc/apache2/mods-enabled/php7.3.load

    to disable the old PHP 7.3 module in apache and try if you can start apache2 now.
     
    mezelf likes this.
  9. mezelf

    mezelf Member

    Indeed! Now I know!
    It worked.
    Thank you very much!
    regards.
     
  10. mezelf

    mezelf Member

  11. Vagner

    Vagner New Member

    I need help please too, apache isnt working.
    Code:
    ░░ A unidade apache2.service está sendo iniciada.
    fev 14 19:35:39 vps1 apachectl[21607]: [Fri Feb 14 19:35:39.606543 2025] [so:warn] [pid 21607:tid 21607] AH01574: module php7_module is already loaded, skipping
    fev 14 19:35:39 vps1 apachectl[21607]: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7
    fev 14 19:35:39 vps1 apachectl[21607]: AH00112: Warning: DocumentRoot [/var/www/clients/client1/web5/web] does not exist
    fev 14 19:35:39 vps1 apachectl[21607]: AH00543: apache2: bad user name web5
    fev 14 19:35:39 vps1 apachectl[21604]: Action 'start' failed.
    fev 14 19:35:39 vps1 apachectl[21604]: The Apache error log may have more information.
    fev 14 19:35:39 vps1 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
    
    Thanks
     
  12. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    it tells you why it isn't working:

    AH00112: Warning: DocumentRoot [/var/www/clients/client1/web5/web] does not exist
    AH00543: apache2: bad user name web5
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the folder of one of your sites has been removed or the site was removed partially and the config file stayed in place. Run:

    grep web5 /etc/apache2/sites-enabled/*

    to find which website file it is and then delete the symlink for that site in /etc/apache2/sites-enabled/ folder.
     
    Vagner likes this.
  14. Vagner

    Vagner New Member

    Hi Till
    Thank you, I couldn't find the error, but you found it easily, thank you very much.
    Everything is working again.
     
    till likes this.
  15. Vagner

    Vagner New Member

    Not everything is perfect.
    Now that I'm calmer, I'm testing everything and I saw that Roundcube also broke.
    And I don't even know where to start.
    Can you help me with this one too?
    When I go to the browser, this message appears.
    Code:
    Unsupported PHP version. Required PHP >= 5.4 and < 8.0. You might need to manually install the phpX.Y package (for X.Y < 8.0) as well as phpX.Y-{cli,intl,json,mbstring}.
    Thank you
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Your current Debian version is Debian 11?
     
    Vagner likes this.
  17. Vagner

    Vagner New Member

    Yes
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Vagner likes this.
  19. Vagner

    Vagner New Member

    Till
    I have already done all these configurations according to the post https://www.howtoforge.com/update-t...pdate-paths-to-use-php-as-default-php-version.
    See the results
    Code:
    Existem 8 escolhas para a alternativa php (disponibiliza /usr/bin/php).
    
      Selecção   Caminho          Prioridade Estado
    ------------------------------------------------------------
      0            /usr/bin/php8.4   84        modo automático
      1            /usr/bin/php7.0   70        modo manual
      2            /usr/bin/php7.3   73        modo manual
    * 3            /usr/bin/php7.4   74        modo manual
      4            /usr/bin/php8.0   80        modo manual
      5            /usr/bin/php8.1   81        modo manual
      6            /usr/bin/php8.2   82        modo manual
      7            /usr/bin/php8.3   83        modo manual
      8            /usr/bin/php8.4   84        modo manual
    
    Existem 5 escolhas para a alternativa php-cgi (disponibiliza /usr/bin/php-cgi).
    
      Selecção   Caminho              Prioridade Estado
    ------------------------------------------------------------
      0            /usr/bin/php-cgi8.1   81        modo automático
      1            /usr/bin/php-cgi7.0   70        modo manual
      2            /usr/bin/php-cgi7.3   73        modo manual
    * 3            /usr/bin/php-cgi7.4   74        modo manual
      4            /usr/bin/php-cgi8.0   80        modo manual
      5            /usr/bin/php-cgi8.1   81        modo manual
    
    Pressione <enter> para manter a escolha actual[*], ou digite o número da selecção:
    
    
      Selecção   Caminho                   Prioridade Estado
    ------------------------------------------------------------
      0            /run/php/php8.1-fpm.sock   81        modo automático
      1            /run/php/php7.0-fpm.sock   70        modo manual
      2            /run/php/php7.3-fpm.sock   73        modo manual
    * 3            /run/php/php7.4-fpm.sock   74        modo manual
      4            /run/php/php8.0-fpm.sock   80        modo manual
      5            /run/php/php8.1-fpm.sock   81        modo manual
    
    Pressione <enter> para manter a escolha actual[*], ou digite o número da selecção:
    
    
    
    Thank you
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page