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
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
-
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
-
@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?
-
@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!!
-
@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?
-
@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.
-
@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?
-
@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.
-
@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/