I have set up a Drush alias for my website (hosted on a shared hosting), the alias works correctly, because commands like drush status
, drush cc all
, etc. work. The problem comes with drush uli
. It generates the one-time login link, the domain is correct, everything looks all right, but when entered into a browser, it results in standard Drupal
Access Denied
page.
Part of setting up the alias and some interesting issues around path-alias
-es, relations to database settings, it's usage and relevancy the aliases is originally discussed in Drush issues page on GitHub.
Technical information:
- This is a clean Drupal 7 installation, without contrib modules.
- I can log in using password (even using password set via
drush upwd
using the same alias). - I have checked all possible sources (like truncating
sessions
table, etc.) discussed in similar but yet different issue on StackExchange. - I have tried different browsers and cleared browser caches and cookies as suggested in various similar discussions on Drupal.org, all without luck.
Drush alias:
$aliases['myalias'] = array(
'uri' => 'mysite.com',
'root' => '/home/mysite.com/web',
'path-aliases' => array(
'%drush' => '/home/.composer/vendor/drush/drush',
),
'%files' => '/home/mysite.com/web/sites/mysite.com/files',
);
The alias works correctly for other commands like clearing caches and drush status
confirms that Drupal is bootstrapped correctly.
Access Denied
? Does it recognise the token and redirects first?Access Denied
is directly on the token URL. Thewatchdog
says:415
|0
|access denied
|user/reset/1/1445605040/kxvcztB8oYE5PdRDS02j_Gsef_5eI1gcSvzuSenzotE/login
| ...http://example.com/user/reset/1/1445605040/kxvcztB8oYE5PdRDS02j_Gsef_5eI1gcSvzuSenzotE/login
so the location and URI and URL all seem to be correct.You have tried to use a one-time login ...
, so at least not Access Denied.