Attempting to use drush's runserver to work on a site on my development workstation. Site appears in browser but I can't login even when using the --user parameter.

Here is the output, showing the parameters and the access denied error:

$ drush rs --user=1 /admin
HTTP server listening on 127.0.0.1, port 8888 (see http://127.0.0.1:8888/admin?login), serving site default, logged in as root...
Created new window in existing browser session.
Watchdog: admin | severity: 4 | type: access denied | uid: 0 | 127.0.0.1 | http://127.0.0.1:8888/admin?login |  | 
127.0.0.1 - - [16:32:24] "GET /admin?login HTTP/1.1" 403 2896
...

Comments

kemitix’s picture

Command output with debug and watchdog enabled.

drush rs -d --watchdog --user=1 /admin
Bootstrap to phase 0. [0 sec, 4.93 MB]                               [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 5.22 MB] [bootstrap]
Cache HIT cid: 5.0-dev-commandfiles-0-49f037411f591b4cb6201b7fac000788 [0.01 sec, 5.24 MB] [debug]
Bootstrap to phase 0. [0.05 sec, 11.27 MB] [bootstrap]
Bootstrap to phase 5. [0.07 sec, 11.28 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.07 sec, 11.28 MB] [bootstrap]
Initialized Drupal 7.16 root directory at /home/pcampbell/Projects/svn/site-lb-back/htdocs/future [0.09 sec, 15.35 MB] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.1 sec, 15.36 MB] [bootstrap]
Initialized Drupal site default at sites/default [0.1 sec, 15.36 MB] [notice]
Cache HIT cid: 5.0-dev-commandfiles-2-c32acd775c18a90c5b41d0fc9accf5ab [0.1 sec, 15.37 MB] [debug]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.1 sec, 15.36 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.11 sec, 15.38 MB] [bootstrap]
Successfully connected to the Drupal database. [0.11 sec, 15.39 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.12 sec, 16.36 MB] [bootstrap]
Cache HIT cid: 5.0-dev-commandfiles-5-aa08349babfc3fe25a7ddd21a34fe443 [0.32 sec, 47.29 MB] [debug]
Found command: runserver (commandfile=runserver) [0.33 sec, 48.13 MB] [bootstrap]
Executing: which php-cgi
  /usr/bin/php-cgi
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.41 sec, 48.61 MB] [bootstrap]
Successfully logged into Drupal as root (uid=1) [0.42 sec, 49.33 MB] [bootstrap]
HTTP server listening on 127.0.0.1, port 8888 (see http://127.0.0.1:8888/admin?login), serving site default, logged in as root...
Executing: which xdg-open
  /usr/bin/xdg-open
Opening browser at http://127.0.0.1:8888/admin?login [0.43 sec, 49.79 MB] [notice]
Created new window in existing browser session.
Watchdog: admin | severity: 4 | type: access denied | uid: 0 | 127.0.0.1 | http://127.0.0.1:8888/admin?login |  |
127.0.0.1 - - [16:51:19] "GET /admin?login HTTP/1.1" 403 2895
HTTPRequest Object
(   
    [method] => GET
    [request_uri] => /admin?login
    [uri] => /admin
    [http_version] => HTTP/1.1
    [query_string] => login
    [headers] => Array
        (   
            [Host] => 127.0.0.1:8888
            [Connection] => keep-alive
            [User-Agent] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
            [Accept] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [Accept-Encoding] => gzip,deflate,sdch
            [Accept-Language] => en-GB,en;q=0.8
            [Accept-Charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
            [Cookie] => has_js=1
        )

    [lc_headers] => Array
        (   
            [host] => 127.0.0.1:8888
            [connection] => keep-alive
            [user-agent] => Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4
            [accept] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
            [accept-encoding] => gzip,deflate,sdch
            [accept-language] => en-GB,en;q=0.8
            [accept-charset] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
            [cookie] => has_js=1
        )

    [content_stream] => Resource id #185
    [remote_addr] => 127.0.0.1
    [request_line] => GET /admin?login HTTP/1.1
    [start_time] => 1351615879.2458
    [cur_state:HTTPRequest:private] => 2
    [header_buf:HTTPRequest:private] =>
    [content_len:HTTPRequest:private] => 0
    [content_len_read:HTTPRequest:private] => 0
    [is_chunked:HTTPRequest:private] =>
    [chunk_state:HTTPRequest:private] => 0
    [chunk_len_remaining:HTTPRequest:private] => 0
    [chunk_trailer_remaining:HTTPRequest:private] => 0
    [chunk_header_buf:HTTPRequest:private] =>
    [socket] => Resource id #184
    [response] => HTTPResponse Object
        (   
            [status] => 403
            [status_msg] => Forbidden
            [headers] => Array
                (   
                    [X-Powered-By] => PHP/5.3.3-7+squeeze14
                    [X-Drupal-Cache] => MISS
                    [Etag] => "1351615879-1"
                    [Content-Type] => text/html; charset=utf-8
                    [Content-Language] => en
                    [X-Generator] => Drupal 7 (http://drupal.org)
                    [Cache-Control] => public, max-age=0
                    [Last-Modified] => Tue, 30 Oct 2012 16:51:19 +0000
                    [Expires] => Sun, 19 Nov 1978 05:00:00 GMT
                    [Vary] => Accept-Encoding
                    [Content-Encoding] => gzip
                    [Server] => Drush runserver
                )

            [content] =>
            [stream] => Resource id #203
            [prepend_headers] =>
            [buffer] =>
            [bytes_written] => 2895
        )

)
greg.1.anderson’s picture

Version: » 8.x-6.x-dev
Status: Active » Closed (won't fix)
Issue tags: +Needs migration

This issue was marked closed (won't fix) because Drush has moved to Github.

If you still need help, please ask your question again on Drupal Answers and then post a link here to the new question. Please also change the status of this issue to closed (duplicate).

Use our Github project for contributing code, or reporting bugs, or requesting features.