ispconfig php multiversion

Discussion in 'General' started by lindu, Nov 13, 2019.

  1. lindu

    lindu Member

    hi, now i have phpversion 7.2 , how to add version like cpanel phpversion 7.0 php version 5.6 and add extension .

    thanks
    Lindu
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    There are several tutorial available on that topic. Which Linux Distribution and version do you use?
     
  3. lindu

    lindu Member

    ubuntu 18
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

  5. lindu

    lindu Member

    install failed

    Code:
    The following packages have been kept back:
      certbot clamav clamav-base clamav-daemon clamav-freshclam clamdscan linux-generic
      linux-headers-generic linux-image-generic python3-acme python3-certbot
    0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
    root@cloud:~# apt-get install php7.0 php7.0-cli php7.0-cgi php7.0-fpm
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'php7.0-remctl' for regex 'php7.0'
    Note, selecting 'php7.0-common' for regex 'php7.0'
    Note, selecting 'php-remctl' instead of 'php7.0-remctl'
    E: Unable to locate package php7.0-cli
    E: Couldn't find any package by glob 'php7.0-cli'
    E: Couldn't find any package by regex 'php7.0-cli'
    E: Unable to locate package php7.0-cgi
    E: Couldn't find any package by glob 'php7.0-cgi'
    E: Couldn't find any package by regex 'php7.0-cgi'
    E: Unable to locate package php7.0-fpm
    E: Couldn't find any package by glob 'php7.0-fpm'
    E: Couldn't find any package by regex 'php7.0-fpm'
    root@cloud:~# apt-get install php php-cli php-cgi php-fpm
    
     
  6. lindu

    lindu Member

    i using this too
    https://www.goover.de/article/8-installing-several-php-versions-with-ispconfig3-and-ubuntu-18-04/

    but error

    Code:
    root@cloud:/etc/php# apt-get -y install php7.0 php7.0-common php7.0-fpm php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi php-pear php7.0-mcrypt php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-common php7.0-opcache php7.0-mysql
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'php7.0-remctl' for regex 'php7.0'
    Note, selecting 'php7.0-common' for regex 'php7.0'
    Note, selecting 'php-remctl' instead of 'php7.0-remctl'
    Package php7.0-common is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'php7.0-common' has no installation candidate
    E: Unable to locate package php7.0-fpm
    E: Couldn't find any package by glob 'php7.0-fpm'
    E: Couldn't find any package by regex 'php7.0-fpm'
    E: Unable to locate package php7.0-gd
    E: Couldn't find any package by glob 'php7.0-gd'
    E: Couldn't find any package by regex 'php7.0-gd'
    E: Unable to locate package php7.0-mysql
    E: Couldn't find any package by glob 'php7.0-mysql'
    E: Couldn't find any package by regex 'php7.0-mysql'
    E: Unable to locate package php7.0-imap
    E: Couldn't find any package by glob 'php7.0-imap'
    E: Couldn't find any package by regex 'php7.0-imap'
    E: Unable to locate package php7.0-cli
    E: Couldn't find any package by glob 'php7.0-cli'
    E: Couldn't find any package by regex 'php7.0-cli'
    E: Unable to locate package php7.0-cgi
    E: Couldn't find any package by glob 'php7.0-cgi'
    E: Couldn't find any package by regex 'php7.0-cgi'
    E: Unable to locate package php7.0-mcrypt
    E: Couldn't find any package by glob 'php7.0-mcrypt'
    E: Couldn't find any package by regex 'php7.0-mcrypt'
    E: Unable to locate package php7.0-curl
    E: Couldn't find any package by glob 'php7.0-curl'
    E: Couldn't find any package by regex 'php7.0-curl'
    E: Unable to locate package php7.0-intl
    E: Couldn't find any package by glob 'php7.0-intl'
    E: Couldn't find any package by regex 'php7.0-intl'
    E: Unable to locate package php7.0-pspell
    E: Couldn't find any package by glob 'php7.0-pspell'
    E: Couldn't find any package by regex 'php7.0-pspell'
    E: Unable to locate package php7.0-recode
    E: Couldn't find any package by glob 'php7.0-recode'
    E: Couldn't find any package by regex 'php7.0-recode'
    E: Unable to locate package php7.0-sqlite3
    E: Couldn't find any package by glob 'php7.0-sqlite3'
    E: Couldn't find any package by regex 'php7.0-sqlite3'
    E: Unable to locate package php7.0-tidy
    E: Couldn't find any package by glob 'php7.0-tidy'
    E: Couldn't find any package by regex 'php7.0-tidy'
    E: Unable to locate package php7.0-xmlrpc
    E: Couldn't find any package by glob 'php7.0-xmlrpc'
    E: Couldn't find any package by regex 'php7.0-xmlrpc'
    E: Unable to locate package php7.0-xsl
    E: Couldn't find any package by glob 'php7.0-xsl'
    E: Couldn't find any package by regex 'php7.0-xsl'
    E: Unable to locate package php7.0-zip
    E: Couldn't find any package by glob 'php7.0-zip'
    E: Couldn't find any package by regex 'php7.0-zip'
    E: Unable to locate package php7.0-mbstring
    E: Couldn't find any package by glob 'php7.0-mbstring'
    E: Couldn't find any package by regex 'php7.0-mbstring'
    E: Unable to locate package php7.0-soap
    E: Couldn't find any package by glob 'php7.0-soap'
    E: Couldn't find any package by regex 'php7.0-soap'
    E: Package 'php7.0-common' has no installation candidate
    E: Unable to locate package php7.0-opcache
    E: Couldn't find any package by glob 'php7.0-opcache'
    E: Couldn't find any package by regex 'php7.0-opcache'
    E: Unable to locate package php7.0-mysql
    E: Couldn't find any package by glob 'php7.0-mysql'
    E: Couldn't find any package by regex 'php7.0-mysql'
    root@cloud:/etc/php# apt-get -y install php5.6 php5.6-common php5.6-fpm php5.6-gd php5.6-mysql php5.6-imap php5.6-cli php5.6-cgi php-pear php5.6-mcrypt php5.6-curl php5.6-intl php5.6-pspell php5.6-recode php5.6-sqlite3 php5.6-tidy php5.6-xmlrpc php5.6-xsl php-memcache php-imagick php-gettext php5.6-zip php5.6-mbstring php5.6-soap php5.6-common php5.6-opcache php5.6-mysql
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'php5.6-json' for regex 'php5.6'
    Note, selecting 'php5.6-common' for regex 'php5.6'
    Package php5.6-common is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    
    E: Package 'php5.6-common' has no installation candidate
    E: Unable to locate package php5.6-fpm
    E: Couldn't find any package by glob 'php5.6-fpm'
    E: Couldn't find any package by regex 'php5.6-fpm'
    E: Unable to locate package php5.6-gd
    E: Couldn't find any package by glob 'php5.6-gd'
    E: Couldn't find any package by regex 'php5.6-gd'
    E: Unable to locate package php5.6-mysql
    E: Couldn't find any package by glob 'php5.6-mysql'
    E: Couldn't find any package by regex 'php5.6-mysql'
    E: Unable to locate package php5.6-imap
    E: Couldn't find any package by glob 'php5.6-imap'
    E: Couldn't find any package by regex 'php5.6-imap'
    E: Unable to locate package php5.6-cli
    E: Couldn't find any package by glob 'php5.6-cli'
    E: Couldn't find any package by regex 'php5.6-cli'
    E: Unable to locate package php5.6-cgi
    E: Couldn't find any package by glob 'php5.6-cgi'
    E: Couldn't find any package by regex 'php5.6-cgi'
    E: Unable to locate package php5.6-mcrypt
    E: Couldn't find any package by glob 'php5.6-mcrypt'
    E: Couldn't find any package by regex 'php5.6-mcrypt'
    E: Unable to locate package php5.6-curl
    E: Couldn't find any package by glob 'php5.6-curl'
    E: Couldn't find any package by regex 'php5.6-curl'
    E: Unable to locate package php5.6-intl
    E: Couldn't find any package by glob 'php5.6-intl'
    E: Couldn't find any package by regex 'php5.6-intl'
    E: Unable to locate package php5.6-pspell
    E: Couldn't find any package by glob 'php5.6-pspell'
    E: Couldn't find any package by regex 'php5.6-pspell'
    E: Unable to locate package php5.6-recode
    E: Couldn't find any package by glob 'php5.6-recode'
    E: Couldn't find any package by regex 'php5.6-recode'
    E: Unable to locate package php5.6-sqlite3
    
    
     
  7. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Do not use two tutorials at the same time.
    Did the suru.org repository get added? What is in /etc/apt/sources.list and what are contents of files in /etc/apt/sources.list.d/?
    What shows for example command
    Code:
    apt-cache policy php7.0-common
    Are you sure you followed the tutorial? And only one tutorial? Did command
    Code:
    apt-get update
    complete with no errors?
     
  8. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Why do you have that error? Is your Ubuntu APT broken already before you start adding additional PHP versions?
     
  9. lindu

    lindu Member

    What is in /etc/apt/sources.list
    Code:
     
    ## Note, this file is written by cloud-init on first boot of an instance
    ## modifications made here will not survive a re-bundle.
    ## if you wish to make changes you can:
    ## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
    ##     or do the same in user-data
    ## b.) add sources in /etc/apt/sources.list.d
    ## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
    
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic main restricted universe multiverse
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-updates main restricted universe multiverse
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic universe
    deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic universe
    deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-updates universe
    deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-updates universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team, and may not be under a free licence. Please satisfy yourself as to
    ## your rights to use the software. Also, please note that software in
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    # deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic multiverse
    # deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-updates multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-updates multiverse
    
    ## Uncomment the following two lines to add software from the 'backports'
    ## repository.
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main restricted universe multiverse release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    # deb http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-backports main restricted universe multiverse restricted universe multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu/ bionic-backports main restricted universe multiverse restricted universe multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    # deb http://archive.canonical.com/ubuntu bionic partner
    # deb-src http://archive.canonical.com/ubuntu bionic partner
    
    deb http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security main restricted universe multiverse
    deb-src http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security main restricted universe multiverse
    deb http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security universe
    deb-src http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security universe
    # deb http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security multiverse
    # deb-src http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security multiversedeb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
     
    /etc/apt/sources.list.d/?
    Code:
     nodesource.list  php.list 
    apt-cache policy php7.0-common
    Code:
    php7.0-common:
      Installed: (none)
      Candidate: (none)
      Version table:
    
    apt-get update
    Code:
    Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease
    Hit:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease
    Hit:3 https://deb.nodesource.com/node_13.x bionic InRelease
    Hit:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease
    Ign:5 https://packages.sury.org/php bionic InRelease
    Err:6 https://packages.sury.org/php bionic Release
      404  Not Found [IP: 104.31.94.169 443]
    Reading package lists... Done
    W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:23
    W: Target Packages (universe/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:22
    W: Target Packages (universe/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:22
    
    Why do you have that error? Is your Ubuntu APT broken already before you start adding additional PHP versions?
    --> i want to add web which requirement php 70

    php 7.2 no issue, need php 70
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    If I remember correctly, the sury.org packages are for Debian only, for Ubuntu you use packages from ondrej ppa:

    Code:
    sudo apt install software-properties-common
    sudo add-apt-repository ppa:ondrej/php
    sudo apt update
    
    beside that, the package installation and names should be the same.
     
  11. lindu

    lindu Member

    sudo add-apt-repository ppa:eek:ndrej/php
    Cannot add PPA: 'ppa:~eek/ubuntu/ppa'.
    ERROR: '~eek' user or team does not exist.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Please recheck my post, the forum messed up the code and I fixed that.
     
  13. lindu

    lindu Member

  14. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    My guess is you have added both Debian and Ubuntu repositories so the apt system is now broken. Verify that first and fix if it is broken .
    Read the questions twice to make sure you do what is asked for.
    what are contents of files in /etc/apt/sources.list.d/?
     
  15. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    You just did not bother mention that error previously?
     
  16. lindu

    lindu Member

    done

    php7.0-common:
    Installed: 7.0.33-12+ubuntu18.04.1+deb.sury.org+1
    Candidate: 7.0.33-12+ubuntu18.04.1+deb.sury.org+1
    Version table:
    *** 7.0.33-12+ubuntu18.04.1+deb.sury.org+1 500
    500 http://ppa.launchpad.net/ondrej/php/ubuntu bionic/main amd64 Packages
    100 /var/lib/dpkg/status
    root@cloud:/etc/apt/sources.list.d#
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Check teh file /etc/apt/sources.list if it contains lines for sury.org, if yes, commant them out by adding a # in front of the lines, then run:

    apt-get update

    nad check if the error is gone.
     
  18. lindu

    lindu Member

    sury not found,
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Just checked the guide you used first, the sury listing is in the file /etc/apt/sources.list.d/php.list
     
    lindu likes this.
  20. lindu

    lindu Member

    Code:
    cd /etc/init.d/
    root@cloud:/etc/init.d# ls
    aegis                  clamav-freshclam  keyboard-setup.sh  php7.2-fpm       rsyslog
    amavis                 console-setup.sh  kmod               plymouth         spamassassin
    amavisd-snmp-subagent  cron              memcached          plymouth-log     ssh
    amavis-mc              dbus              mysql              postfix          sysstat
    apache2                dovecot           nscd               postgrey         udev
    apache-htcacheclean    fail2ban          ntp                procps           ufw
    apparmor               grub-common       openbsd-inetd      pure-ftpd-mysql  unattended-upgrades
    atd                    haveged           opendkim           quota            uuidd
    bind9                  hwclock.sh        opendmarc          quotarpc
    chrony                 irqbalance        php5.6-fpm         resolvconf
    clamav-daemon          jailkit           php7.0-fpm         rsync
    root@cloud:/etc/init.d#
    
    systemctl enable php7.0-fpm php5.6-fpm and work.
    thank you.
     

Share This Page