Closed geekdenz closed 6 years ago
Which version of the CMS are you running against?
I ran
composer create-project silverstripe/installer /path/to/project 3.5.3
which is on the Download page: https://www.silverstripe.org/download/
So, 3.5.3.
I installed on Ubuntu 16.04.2 with the latest PHP 5.6 version available through the PPA.
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6 php5.6-sqlite3
SQLite as a backend DB is actually really good for small sites, testing fixtures or if you want to show something quickly and version the DB easily as well. The site runs pretty fast as well, so unless one has a high traffic writing DB site, I think SQLite is quite good and therefore important.
Do you get any further information when it fails - an error message explaining why or anything? Which version of sqlite3 are you using?
I noticed that there were 2 files. Sorry doing this from plain memory as I was doing this on another machine.
something like database.sqlite database.sqlite;utf-8
Yes, a semi colon in the file name and the first file was 0 bytes size which surprised me.
There was just a "Server Error" as far as I recall. No error in the Apache log files. The script seems to have failed on
VACUUM
and when I turned it off, it succeeded.
Yes those filenames look correct (semi-colon is expected too, though it is strange admittedly). Do you have dev mode enabled in SilverStripe?
Dev mode is probably on, yes. At least I didn't turn it off. /dev/build wouldn't work with it off, would it?
/dev/build wouldn't work with it off, would it?
it would if you're logged in. dev mode is not on by default - you'd have to turn it on in your _ss_environment.php
file or the config layer.
So, do you think turning it on would change anything? I believe I was logged in while trying /dev/build.
Hopefully it will display the actual error message. Could you try that? Either:
// _ss_environment.php
define('SS_ENVIRONMENT_TYPE', 'dev');
or
# config.yml
Director:
environment_type: 'dev'
OK, I went through setting up _ss_environment.php and now it doesn't fail on the VACUUM. I suspect I configured something wrong and I think it was the DB name, although if memory serves me right, it was the default that SilverStripe gave me on install.php. Maybe try without _ss_environment.
Looks like @geekdenz resolve fix is own issue.
/dev/build failed for me on the VACUUM statement. Changing this line: https://github.com/silverstripe/silverstripe-sqlite3/blob/1.4/code/SQLite3SchemaManager.php#L29
to
fixes it for me.