Article directory
What to do when the administrator displays the message "No supported PHP extensions available (SQLite3, PDO_SQLite)" when opening the SQLite database? This article provides a step-by-step guide on modifying php.ini and installing and enabling the pdo_sqlite and sqlite3 extensions. Restarting the service will take effect immediately. Troubleshoot easily in 1 minute!
I've been working on something for the past couple of days, and it's been so frustrating that I'm almost questioning my existence.
I'm hereHestiaCPI installed Adminer, that lightweight database management tool, and wanted to use it to manage my SQLite database. But when I opened the page, a pop-up message in red text appeared saying, "No supported PHP extensions are available (SQLite3, PDO_SQLite)".

I was stunned.
What does this mean? I have SQLite installed, and PHP is running. Why is the extension unavailable?
To be honest, I initially thought it was a problem with Admin itself, so I restarted the service several times and even reinstalled it, but the problem persisted. Later, I realized that it had nothing to do with Admin; the issue stemmed from a common pitfall that many beginners fall into.
Extension issues caused by HestiaCP's multi-version PHP mechanism
HestiaCP supports multiple versions of PHP running concurrently.
This means you can install PHP 7.4, 8.0, 8.1, 8.2, and 8.3 on your server simultaneously, and different websites can be bound to different versions of PHP. Sounds pretty advanced, right? But here's the problem: when you directly type...php -mWhen you check the module, it uses the system's default PHP version, which may be completely different from the version actually bound to your website.
I spent ages searching and found that my website is bound to PHP 8.2, but the terminal shows 8.1. No wonder I can't find the sqlite module.
This feeling is so absurd. It's like going to a restaurant to order food, and the waiter tells you that the dish is unavailable. But it turns out that it's not unavailable, you just came to the wrong person. You have to talk to the kitchen for it to work.
How to determine the PHP version used by a website
So the solution is simple: first, you need to figure out which version of PHP your website is using, and then install the corresponding extensions.
The first step is to determine which PHP version your site is using.
Log in to the HestiaCP backend, go to the web page, find the domain where you installed Admin, click edit, and look at the Web Server PHP Version field. The number shown there is the correct one. It could be 8.1, 8.2, or 8.3; you need to confirm this number first.
Many people skip this step, thinking it doesn't matter since it's all PHP anyway. But it really matters; if the version numbers don't match, installing more extensions won't help.
Install the corresponding version of the SQLite extension.
The second step is to install the corresponding version of the SQLite extension.
Once you know the version number, you can install it directly using your system package manager. Assuming your site uses PHP 8.2, then:
apt update
apt install php8.2-sqlite3 -yIf your site uses version 8.1 or 8.3, just change the version number.
To be honest, I wasn't sure which version I had, so I just installed the common ones:
apt install php8.1-sqlite3 php8.2-sqlite3 php8.3-sqlite3 -yThis way, it can cover any version, saving you time and effort.
Restart the PHP-FPM service for the extension to take effect.
The third step is to restart the PHP-FPM service.
This is a step many people overlook. After installing the extension, they immediately refresh the page, only to still get an error. It's not that the extension wasn't installed; it's that you didn't restart the corresponding PHP-FPM process, and the newly installed extension hasn't loaded yet.
Restart command:
systemctl restart php8.2-fpm
systemctl restart nginxYou can change the version number according to your actual situation.
Verify that the SQLite extension is installed successfully.
The fourth step is to verify it.
You can specify a specific PHP version path to check:
php8.2 -m | grep -i sqliteIf the output containspdo_sqliteOrsqlite3That means the installation was successful. Now, refresh the Administrator page in your browser, and the red warning message should disappear.
That's how I figured it out step by step, from initially thinking "What is this?" to later realizing "Oh, I see," and I took quite a few detours along the way. The main problem was that HestiaCP's multi-version PHP design was indeed prone to pitfalls; if you weren't familiar with its logic, it was easy to go astray right from the very first step.
Some might ask, why make HestiaCP so complicated? Couldn't we just use a single, unified PHP version? The design makes sense; different websites might rely on different PHP features, and forcing a uniform version could cause compatibility issues. However, this mechanism is indeed not very user-friendly for beginners, and it's not particularly emphasized in the documentation.
My own experience is that when using panels like HestiaCP, you must develop the habit of first figuring out which PHP version your website is bound to. Whether installing extensions, changing configurations, or troubleshooting, this version number is the most crucial starting point. Many times, what you think is a problem with a certain service is actually just a version mismatch.
How to describe the feeling? It's like you take your car to get it repaired, and the mechanic says they don't have the part. Turns out, they do have it, but you went to the wrong repair shop and you need to go to the one next door. It sounds a bit silly, but that's really how it is.
Okay, that concludes my experience sharing on resolving the Administrator error on HestiaCP. I hope it can help you if you encounter the same problem.
Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ The article "Adminer prompts 'No supported PHP extension available'? Fix SQLite3/PDO_SQLite error in 1 minute" shared here may be helpful to you.
Welcome to share the link of this article:https://www.chenweiliang.com/cwl-34411.html
