More articles:
2017   2018   2019   2020   2021
2022   2023   2024   

2023-06-19 00:00:00

TechnologyBookworm|debian|LAMP|PHP|upgrade

How to upgrade to Debian 12, and tips for troubleshooting problems in LAMP

Debian 12 (Bookworm) was released in June 2023 for Linux computers. The new version features a massive number of updates, such as a new Linux kernel, new PHP version, LibreOffice and much more. Upgrading an operating system to a new major release is always somewhat distressful task, especially if you are upgrading a production server or a PC that is the primary workstation of someone. Here is our guide for upgrading Debian to version 12 with tips for systems running applications that rely on LAMP software packages (Linux, Apache, Mysql/Mariadb, PHP).

Before you start the upgrade

Major releases of Debian can only be upgraded from the previous version. The system you want to upgrade must be running on Debian 11 before you can start. Here is a guide for upgrading to Debian 11. Not sure which version you have? Type on the command line:
hostnamectl
If it doesn't run, type:
cat /etc/debian_version

Copy these two network configuration files into a safe place before starting the upgrade:

/etc/resolv.conf
/etc/network/interfaces

(Having a copy of resolv.conf saved my day because for some reason upgrade process deleted the existing resolv.conf).

To minimize package conflicts, check the status of current apt packages, and remove old ones:

dpkg --audit
apt clean
apt autoremove

If you believe available disk space could run low during the upgrade, check the status:
df

Perhaps there are packages you can remove? List installed packages:
apt list --installed

I rarely reboot our Linux servers or PCs, but at this stage - just before the actual upgrade I rebooted the computer.

The Debian 12 upgrade process

First, the apt package system has to be told that you want Debian 12 Bookworm software instead of Bullseye. This means editing a few lines in the configuration file /etc/apt/sources.list. Below is a list of key lines required by Debian. The principle is to replace bullseye with bookworm. Your sources.list may have more lines for additional packages. Also files in the sources.list.d -directory may point to additional packages. Here are the key lines you need:

deb http://deb.debian.org/debian/ bookworm main
deb http://security.debian.org/debian-security bookworm-security main
deb http://deb.debian.org/debian/ bookworm-updates main
deb http://deb.debian.org/debian bookworm non-free non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates non-free non-free-firmware

(Thanks to https://www.debugpoint.com/upgrade-debian-12-from-debian-11/ for the list)

Now, let's start. Type the following on the command line:

apt update

The last lines of the output look like something below:

Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
2069 packages can be upgraded. Run 'apt list --upgradable' to see them.

Next, type:

apt upgrade

You should see something like this:

1694 upgraded, 224 newly installed, 0 to remove and 375 not upgraded.
Need to get 1,526 MB of archives.
After this operation, 1,750 MB of additional disk space will be used.

Patience, it can take a long time to finish. Once it is done, you can run the major version upgrade:

apt full-upgrade

You should see something like:

375 upgraded, 123 newly installed, 46 to remove and 0 not upgraded.
Need to get 436 MB of archives.
After this operation, 325 MB of additional disk space will be used.
Do you want to continue? [Y/n]

Again, this process may take some time to finish.

If the upgrade completed without critical errors, reboot the system. Once it is up and running, verify the operating system version:

hostnamectl
or
cat /etc/debian_version

Troubleshooting

If you have problems with connecting to the network after the upgrade (the command line error message can be something like:
Temporary failure in name resolution
you may have lost your DNS configuration file. This is why the first thing to do before starting the upgrade was to backup the file/etc/resolv.conf. Now is the perfect time to recover the file in its original location.

Servers that are running a LAMP software may encounter critical errors because all the key packages for Apache, Mysql/Mariadb and PHP have been upgraded.

PHP seems to be the major casualty. You have to manually install PHP 8.2 and additional PHP modules that your system requires.

apt install php8.2

And the modules you need, such as ((which modules are needed depends on the applications and services you are running):

apt install php8.2-mysql
apt install php8.2-mbstring

Remember to restart the web server after these changes. If you are running Apache2:

systemctl restart apache2

We are running Wordpress CMS, so it was the first service we tested after PHP installation. Although Wordpress worked, we had a theme that completely broke the entire Wordpress when it was activated. The theme worked fine with PHP 7.4, but PHP 8.2 caused the theme to crash.

PHP 8.2 may break programs that ran fine earlier.

Updated on 2023-08-09: here is an articlethat lists major changes in PHP 8.2 compared to earlier version.

Upgrading to PHP 8.2 may not only break Wordpress themes, but Wordpress plugins as well. We have encountered two plugins so far that failed to run on PHP 8.2. The problems didn't instantly make themselves known, so identifying them required some research. The core Wordpress is compatible with PHP 8.2.

We have a number of tool programs and web applications written in PHP, and some of them started misbehaving after the upgrade to PHP 8.2. So far, we have identified two common problems in the PHP code of the programs we have: variable typesand timezone. PHP has been flexible with variable types so far, but now it requires a variable to stick to its type. Most often, the code we have corrected had undeclared or empty arrays. Surprisingly many programs rely they are running on the same timezone as the underlying operating system. Now, this timezone must be set in PHP - either in the PHP.ini file or in the program using a dedicated function.

Debian development team has written a thorough upgrade document that you can view here.

News

2026-02-08 15:26:00

As a whole, it was a delightful trip to the visitor-friendly city. Here are the highlights of the Montpellier city center. #travel #Europe #Francehttps://klaava.com/city-break-in-the-pretty-and-friendly-montpellier-in-southern-france/


News

2026-01-27 15:27:00

Judged anonymously by an international panel, the 2025 TPOTY shortlist was selected from more than 20,000 entries across 160 countries, making this one of the most competitive #travel #photography competitions in the world.https://www.digitalcameraworld.com/photography/awards-and-competitions/the-worlds-best-travel-photographs-are-crowned-and-the-winning-images-are-simply-stunning


News

2026-01-22 17:33:00

A survey revealed the level of trust people have in their fellow citizens in 90 countries across the world. Here is the top 50 countries where people trust in other people the most. #travel #safety .https://klaava.com/when-traveling-do-you-trust-people-overseas-here-is-how-much-locals-across-the-world-trust-their-fellow-citizens/


Evening in the historic center of Montpellier.

2026-01-21 16:00:50

arihak

Evening in the historic center of Montpellier.


News

2026-01-08 15:26:00

While residents’ concern about masstourism in some countries in #Europe is real, where do Europeans themselves #travel when they want to enjoy a week-long break? .https://klaava.com/where-europeans-like-to-travel-for-one-week-holiday-in-the-eu-region/


Statues guarding a castle in Copenhagen.

2026-01-07 17:08:46

Statues guarding a castle in Copenhagen.


Wide open Atlantic Ocean

2026-01-04 12:50:32

arihak

Wide open Atlantic Ocean


News

2025-12-26 14:41:00

If we look at the millions of tourists who will travel somewhere they haven’t visited before, we can discover trends that are gradually changing how and where we travel. Here is our take on #travel #trends for #2026 .https://klaava.com/travel-trends-2026-road-trips-calm-and-quiet-ai-assistants-and-popular-culture/


Just in case you forgot to bring your own #book to the port

2025-12-24 17:12:21

arihak

Just in case you forgot to bring your own#book to the port


News

2025-12-24 08:24:00

I downloaded a #phone app with a “zero-processing” feature that claimed to take photos without any software alterations. When comparing the photos my phone #camera takes automatically to the photos taken with this app, the results were shocking. #photography .https://www.theguardian.com/commentisfree/2025/dec/23/smartphones-photos-filters-pictures-software


News

2025-12-16 08:59:00

9 professional #cyclists produced enough power on pedals for an ultralight airplane to take off in Mallorca.https://elpais.com/deportes/ciclismo/2025-12-15/las-alas-de-red-bull-como-nueve-ciclistas-despegan-un-ultraligero-con-sus-pedales.html


News

2025-12-11 16:33:00

Person of the Year focuses world’s attention on the people that shape our lives, TIME editor-in-chief Sam Jacobs wrote. “this year, no one had a greater impact than the individuals who imagined, designed, and built #AI.”--- ok, but is the Editor a person or AI?https://www.euronews.com/culture/2025/12/11/time-person-of-the-year-2025-announced-the-architects-of-ai


News

2025-12-10 08:31:00

Here is the index for the top 30 cities in the world for moving around on a #bicycle. #travel .https://klaava.com/if-you-like-to-explore-cities-you-visit-by-bicycle-here-are-the-best-destinations/


Nice quiet morning, but do scooter manufacturers know about electric vehicles?

2025-12-04 17:49:27

arihak

Nice quiet morning, but do scooter manufacturers know about electric vehicles?


News

2025-12-04 16:40:00

Data from the world's leading hotel groups, travel firms and trend forecasters suggests that 2026 will be the year of quiet escapes, algorithm-shaped itineraries, ultra-personalised retreats and a return to slower, more intentional #travel.https://www.bbc.com/travel/article/20251201-seven-travel-trends-that-will-define-2026


News

2025-12-01 11:01:00

It’s not the tool that matters, but the mind behind it. Perhaps the real question for any #photographer today is not what technology can do next, but what remains worth doing by hand—what still carries the trace of human attention.https://fstoppers.com/opinion/how-photographers-made-themselves-replaceable-714901


News

2025-11-24 11:23:00

It is possible to do a day trip from Madrid, for instance, to Segovia or Avila, or plan a tour that covers all four cities. #Europe #travel .https://klaava.com/four-cities-near-madrid-that-give-visitors-a-taste-of-the-real-spain/


Going down fast.

2025-11-22 16:00:12

arihak

Going down fast.


News

2025-11-16 17:19:00

Confirmed, the peak #travel season in #Europe is longer:“Normally we expect some traffic until the first week of October and then a slow fading until early November, but it has been nonstop.” It was, he says, the busiest October he has ever known.https://edition.cnn.com/2025/11/15/travel/europe-tourism-fall-peak-season


News

2025-11-10 11:33:00

Everything was fine until the Halloween weekend when our journey turned into a nightmare. Suddenly, I couldn’t charge the van from public chargers anymore. #EV #chargerhttps://klaava.com/nitpickers-travel-journal-bank-meddled-with-ev-charging-payments-causing-us-a-halloween-nightmare/


More articles:
2017   2018   2019   2020   2021
2022   2023   2024