- 🇺🇸United States hyperlogos
This still seems to be a thing in D10?
Problem is, I need to use a prefix because I want to use views_database_connector
I guess I can't use sqlite?
- Status changed to Active
over 1 year ago 10:01pm 11 March 2023 - 🇸🇰Slovakia poker10
Tested this on clean Drupal 10.1.x-dev minimal installation profile and if you select SQLite and enter a prefix, there is an error:
Failed to connect to database. The database engine reports the following message: SQLSTATE[HY000]: General error: 14 unable to open database: sites/default/files/.ht.sqlite-minimal_: ATTACH DATABASE :database_file AS :database; Array ( [:database_file] => sites/default/files/.ht.sqlite-minimal_ [:database] => minimal_ ) .
- Does the database file exist?
- Does web server have permission to write to the database file?
- Does the web server have permission to write to the directory the database file should be created in?Database is created with the name
sites/default/files/.ht.sqlite
, but the installer is looking forsites/default/files/.ht.sqlite-minimal_
Therefore switching version to D10, thanks!
- 🇺🇦Ukraine pingwin4eg Zaporizhia 🇺🇦
In D11 the situation is a bit different, but the main problem is the same. Updated IS.
- 🇺🇦Ukraine pingwin4eg Zaporizhia 🇺🇦
I found out that the SQLite driver uses database attachment concept instead of actual table prefixes. Not sure whether this is OK or not, and why it was implemented this way.
If it's OK, then the settings.php documentation needs to mention that, the prefix is better be prepended to a DB file name or appended to a base name before the file extension, and reported errors need to be fixed.
- 🇺🇦Ukraine pingwin4eg Zaporizhia 🇺🇦
Drush error appears even without a table prefix, removing it from IS. It was caused by xdebug.