Closed purplespider closed 8 years ago
Do you have $_FILE_TO_URL_MAPPING
set up in your environment file? see: https://docs.silverstripe.org/en/3.1/developer_guides/cli/
Yep, tried that Dan. Same message.
So we think this is related to Director::forceWWW()
- are you using this on your production site?
If so, can you wrap it in if (!Director::is_cli()) { ... }
to see?
We have a ticket open on framework for this (https://github.com/silverstripe/silverstripe-framework/pull/4025)
Thanks Dan, that did the trick!
I was using if(isset($_SERVER['HTTP_HOST'])) { ... }
to get around this problem before, but it seems like it doesn't work for SSPak or Platform, whereas if (!Director::is_cli()) { ... }
does.
Ah, yes the $_FILE_TO_URL_MAPPING
mapping means that the $_SERVER['HTTP_HOST']
gets polly-filled with a value, so that check would fail.
Trying to save from a remote server with
sspak save USER@SERVER:/home/[username]/public_html site.sspak
, but getting this: