ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    How to Install PHP 7.3 on Ubuntu 18.04

    IT Discussion
    php php 7.3 linux ubuntu ubuntu 18.04
    5
    9
    3.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

      sudo add-apt-repository ppa:ondrej/php
      sudo apt update
      

      Now PHP 7.3 is available to you. Use "php7.3" as the prefix for installer commands.

      If you are like me, install for nGinx:

      sudo apt install php7.3-fpm
      

      Or if you are installing for Apache:

      sudo apt install php7.3
      

      If you run into an issue where add-apt-repository is missing, run this command:

      apt install software-properties-common
      
      scottalanmillerS WLS-ITGuyW 1 3 Replies Last reply Reply Quote 1
      • scottalanmillerS
        scottalanmiller @scottalanmiller
        last edited by

        You will often want to follow up with...

        sudo apt install php7.3-common php7.3-mysql php7.3-xml php7.3-xmlrpc php7.3-curl php7.3-gd php7.3-imagick php7.3-cli php7.3-dev php7.3-imap php7.3-mbstring php7.3-opcache php7.3-soap php7.3-zip php7.3-intl -y
        
        1 Reply Last reply Reply Quote 0
        • WLS-ITGuyW
          WLS-ITGuy @scottalanmiller
          last edited by

          @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

          I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

          Why do you hate doing this? Because Ubuntu 18 is older or because php 7.3 is older?

          scottalanmillerS 1 Reply Last reply Reply Quote 0
          • scottalanmillerS
            scottalanmiller @WLS-ITGuy
            last edited by

            @wls-itguy said in How to Install PHP 7.3 on Ubuntu 18.04:

            @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

            I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

            Why do you hate doing this? Because Ubuntu 18 is older or because php 7.3 is older?

            Why not both πŸ™‚

            I want PHP8 on Ubuntu 20.10!!

            DashrenderD 1 Reply Last reply Reply Quote 0
            • DashrenderD
              Dashrender @scottalanmiller
              last edited by

              @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

              @wls-itguy said in How to Install PHP 7.3 on Ubuntu 18.04:

              @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

              I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

              Why do you hate doing this? Because Ubuntu 18 is older or because php 7.3 is older?

              Why not both πŸ™‚

              I want PHP8 on Ubuntu 20.10!!

              why are you stuck on 18?

              JaredBuschJ 1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @Dashrender
                last edited by JaredBusch

                @dashrender said in How to Install PHP 7.3 on Ubuntu 18.04:

                @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

                @wls-itguy said in How to Install PHP 7.3 on Ubuntu 18.04:

                @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

                I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

                Why do you hate doing this? Because Ubuntu 18 is older or because php 7.3 is older?

                Why not both πŸ™‚

                I want PHP8 on Ubuntu 20.10!!

                why are you stuck on 18?

                Why bother to ask?

                It is not like @scottalanmiller is a person that holds to ancient LTS by choice.

                DashrenderD 1 Reply Last reply Reply Quote 1
                • DashrenderD
                  Dashrender @JaredBusch
                  last edited by

                  @jaredbusch said in How to Install PHP 7.3 on Ubuntu 18.04:

                  @dashrender said in How to Install PHP 7.3 on Ubuntu 18.04:

                  @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

                  @wls-itguy said in How to Install PHP 7.3 on Ubuntu 18.04:

                  @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

                  I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

                  Why do you hate doing this? Because Ubuntu 18 is older or because php 7.3 is older?

                  Why not both πŸ™‚

                  I want PHP8 on Ubuntu 20.10!!

                  why are you stuck on 18?

                  Why bother to ask?

                  It is not like @scottalanmiller is a person that holds to ancient LTS by choice.

                  Sure, I get it - but he mentions it's for nGinx - I hope that's a single task box... so I'm curious what's keeping him from running current?

                  JaredBuschJ 1 Reply Last reply Reply Quote 0
                  • JaredBuschJ
                    JaredBusch @Dashrender
                    last edited by JaredBusch

                    @dashrender said in How to Install PHP 7.3 on Ubuntu 18.04:

                    @jaredbusch said in How to Install PHP 7.3 on Ubuntu 18.04:

                    @dashrender said in How to Install PHP 7.3 on Ubuntu 18.04:

                    @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

                    @wls-itguy said in How to Install PHP 7.3 on Ubuntu 18.04:

                    @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

                    I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

                    Why do you hate doing this? Because Ubuntu 18 is older or because php 7.3 is older?

                    Why not both πŸ™‚

                    I want PHP8 on Ubuntu 20.10!!

                    why are you stuck on 18?

                    Why bother to ask?

                    It is not like @scottalanmiller is a person that holds to ancient LTS by choice.

                    Sure, I get it - but he mentions it's for nGinx - I hope that's a single task box... so I'm curious what's keeping him from running current?

                    You said it. The single task the box runs, which is not nginx. The task simply has a nginx as it's front end.

                    Assumption? Sure. But likely close.

                    1 Reply Last reply Reply Quote 0
                    • 1
                      1337 @scottalanmiller
                      last edited by 1337

                      @scottalanmiller said in How to Install PHP 7.3 on Ubuntu 18.04:

                      I hate having to do this, but sometimes it has to be done. Here is how to get this middling PHP version onto this old version of Ubuntu.

                      sudo add-apt-repository ppa:ondrej/php
                      sudo apt update
                      

                      I'm not sure that is the proper way to do it.
                      ppa are personal repositories - meaning someone put it together.

                      I think Ubuntu has offical backports, just like Debian.
                      In that case it would be better to get a the "newer" php version from the backport repository instead.


                      UPDATE.
                      It looks like the ondrej/php repository is actually maintained by a Debian developer, OndΕ™ej SurΓ½. He is one of the package maintainers for the official debian and ubuntu php packages.
                      https://deb.sury.org/

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post