Development

Installing PHP 7.4 Beta4 on Ubuntu 18.04

Installing the new PHP 7.4 Beta 4 on an Ubuntu 18.04 server, 7.4 Beta4 was released on the 22nd of August 2019.

Start by updating package lists and information

sudo apt-get update

Next install apache and basic PHP module, which should be PHP version 7.3

sudo apt-get install apache2 php libapache2-mod-php

For 7.4 we will need to add a third party repository to download and install from, this is done like so:

apt-get install software-properties-common

add-apt-repository ppa:ondrej/php

apt-get update

Now PHP version 7.4 can be installed, this will do the latest release (Beta4):

sudo apt install php7.4-fpm

Time to switch the versions, from 7.3 to 7.4 and then restarting apache:

sudo a2dismod php7.3

sudo a2enmod php7.4

sudo service apache2 restart

Create a simple phpinfo() page to view the details…

<?php
phpinfo();

Which will among other things show you have PHP 7.4

Share

Recent Posts

Kennington reservoir drained drone images

A drained and empty Kennington reservoir images from a drone in early July 2024. The…

1 year ago

Merrimu Reservoir drone images

Merrimu Reservoir from drone. Click images to view larger.

1 year ago

FTP getting array of file details such as size using PHP

Using FTP and PHP to get an array of file details such as size and…

2 years ago

Creating Laravel form requests

Creating and using Laravel form requests to create cleaner code, separation and reusability for your…

2 years ago

Improving the default Laravel login and register views

Improving the default Laravel login and register views in such a simple manner but making…

2 years ago

Laravel validation for checking if value exists in the database

Laravel validation for checking if a field value exists in the database. The validation rule…

2 years ago