Probably my fault — I’m generally OK with this stuff until something goes wrong — but…
I updated a local install (MAMP PRO) to Craft 3.7 by clicking that lovely 'update' button. And it worked fine, first time, no issues.
I then went to update a staging install on my server via SSH and it ran through until it hit this error:
*** applying m210602_111300_project_config_names_in_config Exception: Changes to the project config are not possible while in read-only mode. (/home/***/***.***.***/vendor/craftcms/cms/src/services/ProjectConfig.php:492)
So then I decided to back out, and told it to restore the database backup as prompted. Which lead to this error:
error: PDOStatement::execute(): MySQL server has gone away The SQL being executed was: SELECT GET_LOCK('c4ba60e2215081fdd4fd2710bb13db075668ce52', 2)
At this point my staging site is giving me the Craft branded 'site unavailable' message you get if a version is out of sync somewhere.
But it said I could manually restore using [file]. I FTP to the staging space, and the file (plus a couple of others) are there. So I download them.
I open up TablePlus, connect to the database, and use the restore DB option with the file the terminal specified. It says it’s done it, and it looks OK to the untrained eye (ie. I can see content in there) but now my staging site has changed to an internal server error.
So… I think my best bet is to trash the current staging install, build a new one from the local database, and manually copy and paste the data (that a client had tweaked) from the content table into the brand new site. Irritating, and a bit slow, but hopefully OK.
But I’m concerned about that initial error (the read-only mode). Did I have something misconfigured to set this off?
The original install on the staging site was created with composer, and I understood that composer sets the right permissions as it performs the install.
I’m sure I have updated this install, via SSH, at least once, because it’s a few months old and I try to keep up to date.
Any tips, suggestions, observations etc. before I dig myself a deeper hole gratefully received.