{"id":2348,"date":"2019-03-09T11:08:03","date_gmt":"2019-03-09T08:08:03","guid":{"rendered":"http:\/\/kifarunix.com\/?p=2348"},"modified":"2024-03-11T22:32:20","modified_gmt":"2024-03-11T19:32:20","slug":"how-to-install-php-7-3-3-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-install-php-7-3-3-on-ubuntu-18-04\/","title":{"rendered":"How to Install PHP 7.3.3 on Ubuntu 18.04"},"content":{"rendered":"\n<p>This guides simply describes how to install PHP 7.3.3 on Ubuntu 18.04. PHP is aserver-side, HTML-embedded scripting language. <a href=\"http:\/\/php.net\/archive\/2019.php#id2019-03-07-1\" target=\"_blank\" rel=\"noopener noreferrer\">PHP 7.3.3<\/a> along with other releases such as <a href=\"http:\/\/php.net\/archive\/2019.php#id2019-03-07-2\" target=\"_blank\" rel=\"noopener noreferrer\">PHP 7.2.16<\/a> and <a href=\"http:\/\/php.net\/archive\/2019.php#id2019-03-07-3\" target=\"_blank\" rel=\"noopener noreferrer\">PHP 7.1.27<\/a> have been released with major security bug fixes. In this guide, we are going to focus on PHP 7.3.3. This release has come with several bug fixes and changes that are highlighted below;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Core:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(Core dump using parse_ini_string with numeric sections).<\/li>\n\n\n\n<li>Fixed bug(Buffer Overflow via overly long Error Messages).<\/li>\n\n\n\n<li>Fixed bug(Disabling class causes segfault on member access).<\/li>\n\n\n\n<li>Fixed bug(Custom extension Segmentation fault when declare static property).<\/li>\n\n\n\n<li>Fixed bug(PHP crashes when parsing `(2)::class`).<\/li>\n\n\n\n<li>Fixed bug(iptcembed broken function).<\/li>\n\n\n\n<li>Fixed bug(rename() across the device may allow unwanted access during processing).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>COM:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(Already defined constants are not properly reported).<\/li>\n\n\n\n<li>Fixed bug(Persistence confusion in php_com_import_typelib()).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>EXIF:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(Uninitialized read in exif_process_IFD_in_TIFF).<\/li>\n\n\n\n<li>Fixed bug(Invalid Read on exif_process_SOFn).<\/li>\n\n\n\n<li>Fixed bug(Uninitialized read in exif_process_IFD_in_MAKERNOTE).<\/li>\n\n\n\n<li>Fixed bug(Uninitialized read in exif_process_IFD_in_MAKERNOTE).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Mbstring:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(mb_ereg_replace() with trailing backslash adds null byte).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>MySQL:\n<ul class=\"wp-block-list\">\n<li>Disabled LOCAL INFILE by default, can be enabled using php.ini directive mysqli.allow_local_infile for mysqli, or PDO::MYSQL_ATTR_LOCAL_INFILE attribute for pdo_mysql.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>OpenSSL:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(feof might hang on TLS streams in case of fragmented TLS records).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>PDO_OCI:\n<ul class=\"wp-block-list\">\n<li>Support Oracle Database tracing attributes ACTION, MODULE, CLIENT_INFO, and CLIENT_IDENTIFIER.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>PHAR:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(Null Pointer Dereference in phar_create_or_parse_filename).<br>Fixed bug(phar_tar_writeheaders_int() buffer overflow).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>phpdbg:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(phpdbg support for display_errors=stderr).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>SPL:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(DirectoryIterator glob:\/\/ don&#8217;t support current path relative queries).<br>Fixed bug(openFile() silently truncates after a null byte).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Standard:\n<ul class=\"wp-block-list\">\n<li>Fixed bug(Unintialized php_stream_statbuf in stat functions).<\/li>\n\n\n\n<li>Fixed bug(setcookie() sets incorrect SameSite header if all of its options filled).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installing PHP 7.3.3 on Ubuntu 18.04<\/h2>\n\n\n\n<p>You may also want to check our previous guide on <a href=\"https:\/\/kifarunix.com\/installing-php-7-3-3-on-centos-7-6\/\" target=\"_blank\" rel=\"noopener noreferrer\">installing PHP 7.3.3 on CentOS 7.6<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Update and Upgrade Ubuntu 18.04<\/h3>\n\n\n\n<p>Well, before you can proceed, ensure that your system packages are upto-date. Run the commands below to perform system package update and upgrade.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update<\/pre>\n\n\n\n<pre id=\"block-04324d6e-d43e-4b82-87e8-1b4a2e100ded\" class=\"wp-block-preformatted\">sudo apt upgrade<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Add Ondrej PHP PPA repository<\/h3>\n\n\n\n<p>PHP 7.3 is a not available on Ubuntu 18.04 default repositories. Thanks to <span class=\"st\"><code>Ond\u0159ej Sur\u00fd<\/code> PPA repository that enables us to install the latest versions of PHP. Hence, run the command below to add this PPA repository to your Ubuntu 18.04 system.<br><\/span><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo add-apt-repository ppa:ondrej\/php<\/pre>\n\n\n\n<p>If you encounter the error, <code>sudo: add-apt-repository: command not found<\/code>, install the following package to fix it.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install software-properties-common<\/pre>\n\n\n\n<p>Once the repositories are in place, re-synchronize your system packages to the latest versions.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt update<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Installing PHP 7.3.3 on Ubuntu 18.04<\/h3>\n\n\n\n<p>Your Ubuntu 18.04 system is now ready for PHP 7.3.3 installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install php7.3<\/pre>\n\n\n\n<p>Once the installation is done, you can run the command below to verify the corresponding to the PHP 7.3.3 version in the archives and the locally installed version.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt-cache policy php7.3<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">php7.3:\n  Installed: 7.3.3-1+ubuntu18.04.1+deb.sury.org+1\n  Candidate: 7.3.3-1+ubuntu18.04.1+deb.sury.org+1\n  Version table:\n *** 7.3.3-1+ubuntu18.04.1+deb.sury.org+1 500\n        500 http:\/\/ppa.launchpad.net\/ondrej\/php\/ubuntu bionic\/main amd64 Packages\n        500 http:\/\/ppa.launchpad.net\/ondrej\/php\/ubuntu bionic\/main i386 Packages\n        100 \/var\/lib\/dpkg\/status<\/pre>\n\n\n\n<p>PHP 7.3.3 is now installed and ready to work with Apache web server. However, if you are looking at using PHP 7.3.3 with Nginx, you need to install PHP 7.3.3-FPM as shown below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo apt install php7.3-fpm<\/pre>\n\n\n\n<p>The verification of the same can be done by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-cache policy php7.3-fpm<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">php7.3-fpm:\n  Installed: 7.3.3-1+ubuntu18.04.1+deb.sury.org+1\n  Candidate: 7.3.3-1+ubuntu18.04.1+deb.sury.org+1\n  Version table:\n *** 7.3.3-1+ubuntu18.04.1+deb.sury.org+1 500\n        500 http:\/\/ppa.launchpad.net\/ondrej\/php\/ubuntu bionic\/main amd64 Packages\n        100 \/var\/lib\/dpkg\/status<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Install PHP 7.3 Extensions on Ubuntu 18.04<\/h3>\n\n\n\n<p>Well, if you are looking at working on PHP-based web applications, you need to install various PHP extensions. You can always search for a specific PHP 7.3 extension by running the command below;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt-cache search php7.3-*<\/pre>\n\n\n\n<p>To install a specific PHP 7.3 extension, you would run the command as shown below where <code>&lt;extension-name&gt;<\/code> is the name of a specific extension;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">apt install php7.3-&lt;extension-name><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This guides simply describes how to install PHP 7.3.3 on Ubuntu 18.04. PHP is aserver-side, HTML-embedded scripting language. PHP 7.3.3 along with other releases such<\/p>\n","protected":false},"author":1,"featured_media":17842,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,254,304,342],"tags":[203,343,344,67],"class_list":["post-2348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-apache","category-nginx","category-php","tag-php","tag-php-7-3","tag-php7-3-3","tag-ubuntu-18-04","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2348"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=2348"}],"version-history":[{"count":8,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2348\/revisions"}],"predecessor-version":[{"id":21132,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/2348\/revisions\/21132"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/17842"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=2348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=2348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=2348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}