{"id":488,"date":"2025-01-20T00:20:02","date_gmt":"2025-01-20T00:20:02","guid":{"rendered":"https:\/\/www.flexpaul.com\/?p=488"},"modified":"2025-01-23T20:54:41","modified_gmt":"2025-01-23T20:54:41","slug":"installing-php-upgrading-from-php7-4-to-the-latest-version","status":"publish","type":"post","link":"https:\/\/www.flexpaul.com\/index.php\/2025\/01\/20\/installing-php-upgrading-from-php7-4-to-the-latest-version\/","title":{"rendered":"Installing php8"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\"><strong>(Upgrading from php7.4 to the latest version) php8<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In a previous tutorial we installed php7.4 and it is time for an upgrade to php8!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you followed along with our previous tutorial for a LAMP install, we also installed a few other things that will break once we continue, so <a href=\"https:\/\/www.flexpaul.com\/index.php\/tag\/xoops-removal\/\" data-type=\"post_tag\" data-id=\"355\">xoops should be removed<\/a>, along with weberp, since it does not work with newer php versions, and, as of this writing the wiki no longer works since php is required and we removed php7.4, however, we will see if will just run again after the new php install.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Please see this <a href=\"https:\/\/www.flexpaul.com\/index.php\/2025\/01\/19\/removing-php7-4-on-ubuntu-22-04\/\" data-type=\"post\" data-id=\"470\">tutorial on removing php7.4<\/a> before we continue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ok open a terminal window and lets get going.<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"padding-top:0;padding-bottom:0\"><code>$ sudo apt install php libapache2-mod-php php-mysql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once the installation is finished, run the following command to confirm your PHP version:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"padding-top:0;padding-bottom:0\"><code>$ php -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see something similar!!<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"113\" src=\"https:\/\/www.flexpaul.com\/wp-content\/uploads\/2025\/01\/Screenshot_20250119_160933_Termius2-1024x113.jpg\" alt=\"\" class=\"wp-image-492\" srcset=\"https:\/\/www.flexpaul.com\/wp-content\/uploads\/2025\/01\/Screenshot_20250119_160933_Termius2-1024x113.jpg 1024w, https:\/\/www.flexpaul.com\/wp-content\/uploads\/2025\/01\/Screenshot_20250119_160933_Termius2-300x33.jpg 300w, https:\/\/www.flexpaul.com\/wp-content\/uploads\/2025\/01\/Screenshot_20250119_160933_Termius2-768x84.jpg 768w, https:\/\/www.flexpaul.com\/wp-content\/uploads\/2025\/01\/Screenshot_20250119_160933_Termius2-1536x169.jpg 1536w, https:\/\/www.flexpaul.com\/wp-content\/uploads\/2025\/01\/Screenshot_20250119_160933_Termius2.jpg 1656w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div class=\"wp-block-group has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"wp-block-paragraph\">If you would like to install phpmyadmin, continue to follow along!!<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"padding-top:0;padding-bottom:0\"><code>$ sudo apt install phpmyadmin<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Press Enter to Continue and the first question will be which web-server to configure.  I am working with Apache2, so I will select Apache with my space-bar, press tab, and enter to continue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring phpmyadmin, select Yes!!  <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I have no clue whether you should type in a password or leave it blank, so today, just to see what happens, we will leave it blank.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now to set a password for the root user.<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"padding-top:0;padding-bottom:0\"><code>$ sudo mysql<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then we type:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"padding-top:0;padding-bottom:0\"><code>SELECT user,authentication_string,plugin,host FROM mysql.user;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"padding-top:0;padding-bottom:0\"><code><s>mysql&gt; ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY '<em>password<\/em>';<\/s><\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\" style=\"padding-top:0;padding-bottom:0\"><code>mysql&gt; ALTER USER 'root'@'localhost' IDENTIFIED BY '<em>password<\/em>';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Change password to a strong one, you can remember!!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That should do it, let&#8217;s test. <\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Using your web browser navigate to your site \/phpmyadmin<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ie: localhost\/phpmyadmin<br>https:\/\/yourwebserver.com\/phpmyadmin<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Login with root and the password you created!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Good Luck!!<\/p>\n\n\n<div class=\"wp-block-post-author\"><div class=\"wp-block-post-author__avatar\"><img alt='Avatar photo' src='https:\/\/www.flexpaul.com\/wp-content\/uploads\/2023\/12\/cropped-cropped-image145-96x96.png' srcset='https:\/\/www.flexpaul.com\/wp-content\/uploads\/2023\/12\/cropped-cropped-image145-192x192.png 2x' class='avatar avatar-96 photo' height='96' width='96' \/><\/div><div class=\"wp-block-post-author__content\"><p class=\"wp-block-post-author__name\"><a href=\"https:\/\/www.flexpaul.com\/index.php\/author\/ppmuetze\/\" target=\"_self\">Paul<\/a><\/p><p class=\"wp-block-post-author__bio\">Coffee-fueled and code-driven, I&#8217;m Paul, a digital nomad tech consultant with a knack for navigating the ever-evolving landscapes of open-source software, solar power, and the occasional political pit stop. With 20+ years of experience under my belt, I&#8217;m excited to share my insights, weave captivating narratives about technology&#8217;s impact, and offer valuable perspectives on leadership and positivity. So, grab your digital passport and join me on this virtual voyage of the internet&#8217;s quirky corners, one thought-provoking discussion at a time. Buckle up, it&#8217;s gonna be an informative and wildly exciting ride!<\/p><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>(Upgrading from php7.4 to the latest version) php8 In a previous tutorial we installed php7.4 and it is time for an upgrade to php8! If you followed along with our previous tutorial for a LAMP install, we also installed a few other things that will break once we continue, so xoops should be removed, along [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":496,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[375,366,4],"tags":[17,380,16,377,379,378,376,381,14,382],"class_list":["post-488","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-8-1","category-php","category-tutorial","tag-apache","tag-lamp-stack","tag-linux","tag-mysql","tag-php","tag-php-installation","tag-php-upgrade","tag-server-administration","tag-tutorial","tag-web-development"],"jetpack_featured_media_url":"https:\/\/www.flexpaul.com\/wp-content\/uploads\/2025\/01\/Incoming-Release-PHP-8.0.6.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/posts\/488","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/comments?post=488"}],"version-history":[{"count":9,"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/posts\/488\/revisions"}],"predecessor-version":[{"id":506,"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/posts\/488\/revisions\/506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/media\/496"}],"wp:attachment":[{"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/media?parent=488"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/categories?post=488"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flexpaul.com\/index.php\/wp-json\/wp\/v2\/tags?post=488"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}