The PDO extension needs to be installed with the SQLite3 database driver
-
Just upgraded to latest PhastPress (v2.2), but got this error during activation:
Sorry, PhastPress can't run yet. The PDO extension needs to be installed with the SQLite3 database driver available.I’m confused about how to approach this. What do I need to actually do? The site is on PHP8.0 btw. Thanks for your help.
-
+ such problem too.
-
This reply was modified 4 years, 1 month ago by
neon67.
After some googling, finally figured out what this unexpected message means.
In my case, needed to install a PHP extension at the server (VPS). Namely:
sudo apt-get install php8.0-sqliteafter that the message just went away, with no need to restart anything.
If the website works with a different PHP version (e.g. 7.4) the command becomes instead:
sudo apt-get install php7.4-sqlite[Reference]@neon67: in your case, the said extension might already exists and just need to enable it in
php.ini. Here’s a way of how to do it, or may need to look at your CPanel, or ask your host to do it for you.HTH.
Hey @alx359,
Thanks for posting the fix. I’ve also improved the error message to make it clear what you need to do.
@neon67: You should ask your hosting provider to install the PDO_SQLITE extension for PHP, or install it yourself. How to do this depends on your setup, but usually it happens through cPanel or by installing a package named, eg, php8.1-sqlite.
–Albert
Thanks for the answer. I understand this is a consequence of the new version.
What gives PDO extension? I’m afraid of biside effects – maybe it’s easier to make a downgrade or completely refuse?Hi @neon67,
https://www.drupal.org/docs/7/system-requirements/what-is-pdo
In short: PDO provides database access methods. We use a SQLite database (a file-based database) to store cache data. Previously PhastPress would use simple files to store cached data, but this caused performance issues if the cache got very large. SQLite is expected to be faster.
There will not be side effects of installing PDO or SQLite. It’s an official PHP extension that is included with PHP itself.
–Albert
Thank you for the explanation. So new database must have and without it it does not work?
I have to think about whether to continue playing. I have many other plugins – will there be any compatibility issues.
I’ll wait for the feedbacks of other participants – I disable the plugin until.-
This reply was modified 4 years, 1 month ago by
neon67.
@neon67 , let me chime in again. I’m just an ordinary user, with no other interest but trying to explain, for your sake and the other non-technical users that might be reading this post at some point.
What Albert is saying is
PDO_SQLITEis part of the PHP language itself. Technically, functional enhancements to the PHP language are achieved via “extensions”, and the more you may have, the more versatile PHP will become. Albert has decided to use one of those standard PHP extensions, to improve PhastPress performance further. That’s it. No reason to worry about any incompatibilities with other plugins. WordPress itself uses thePHP mysql extension, so at this time PhastPress is the only plugin in your website utilizing thePHP sqlite extensionand for a very narrow need. The only risk is making sure it gets properly installed in you host. HTH.Is there a way to support older PHP versions without having to use older versions of the plugin. Hostgator does not support Sqlite3 on PhP7.4 and other comments online say their support is of no help when contacted over that. Yet it is not always possible to change hosting. My fear is that the sites with the old plugin will miss out on new features going forward.
I also tried downgrading to PHP7.3 which supports the required module on hostgator but the plugin kept throwing up errors and wasn’t working fully, so I had to upgrade to 7.4 and install the older plugin version — reluctantly.
Hi @barney23,
For now there are no new features in the new version.
There is no reason that they can’t install SQLite3 on PHP 7.4. They’re just lazy.
Unfortunately, I don’t have the time to maintain multiple versions of the plugin for hosting providers that want to keep running old software or don’t support standard PHP extensions.
–Albert
Unfortunately, I don’t have the time to maintain multiple versions of the plugin for hosting providers that want to keep running old software or don’t support standard PHP extensions.
Understandable.
-
This reply was modified 4 years, 1 month ago by
The topic ‘The PDO extension needs to be installed with the SQLite3 database driver’ is closed to new replies.