I've the following error:

The download destination only works when accessed through a http client.

when I'm trying to download db backup via Chrome using freshly installed module on clean installation of Drupal.

Code:

  public function checkWritable() {
    // Check that we're running as a web process via a browser.
    // @TODO: we could check if the 'HTTP_ACCEPT' header contains the right mime but that is probably overkill.
    if (!isset($_SERVER['SERVER_ADDR'])) {
      throw new DestinationNotWritableException(
        "The download destination only works when accessed through a http client."
      );
    }
  }

Probably, because I'm using PHP builtin server via: php -S localhost:8888, so my SERVER_ADDR isn't defined, but SERVER_NAME is.

$_SERVER["SERVER_NAME"] = localhost

Related: https://bugs.php.net/bug.php?id=60480

Comments

kenorb created an issue. See original summary.

kenorb’s picture

Issue summary: View changes
couturier’s picture

A lot of bugs have been fixed with the new 8.x-4.x-alpha2 release on April 4, 2017, more than a year and several releases after you reported this issue. Are you able to confirm that this issue still exists after upgrading to the latest version?

couturier’s picture

Status: Active » Postponed (maintainer needs more info)

Setting to Postponed (maintainer needs more info) since the issue hasn't been confirmed to still exist with more recent releases of Drupal 8 and Backup and Migrate.

couturier’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)