Hi all,

I have Drush working on my Windows machine. I am able to run Cron, and flush the cache. However, I am unable to download modules. I get the following error:

Unable to checkout ***module_name*** from cvs.drupal.org.
An error occurred at function : drush_pm_download

I have installed gzip, libarchive, and wget. Do I need to install anything else to get Drush to work?

Any help with this would be much appreciated.

Cheers in advance.

Comments

jonhattan’s picture

Status: Active » Postponed (maintainer needs more info)

Do you have cvs installed?

Also see the fresh new bug submission guidelines and paste here relevant information.

decibel.places’s picture

Similar problem here, probably related to the Windows 7 Read-Only Bug

C:\mysite>drush dl schema
Unable to download schema-6.x-1.7.tar.gz to

C:\TEMP/drush_tmp_1305564653 from
http://ftp.drupal.org/files/projects/schema-6.x-1.7.tar.gz

wget works but not the drush download so I can use the ftp version info in the error message to download the recommended version manually with wget:

c:\mysite\sites\all\modules\contrib>wget http://ftp.drupal.org/files/projec
ts/schema-6.x-1.7.tar.gz
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
wgetrc_file_name = C:\.wgetrc
--2011-05-16 13:25:41--  http://ftp.drupal.org/files/projects/schema-6.x-1.7.tar
.gz
Connecting to 64.210.197.20:80... connected.
Proxy request sent, awaiting response... 200 OK
Length: 23326 (23K) [application/x-gzip]
Saving to: `schema-6.x-1.7.tar.gz'

100%[======================================>] 23,326      --.-K/s   in 0.006s

HACKY!

I am currently in a corporate environment, and my User Account is tied to my employee ID so I can't just create a new user account. Checking attrib and UAC did not help resolve it. Also I have no "Public" folder set up on my machine. HEEEELLLLP I am stuck (waiting for our sysadmins to fix my local folders) inside a corporate whale!

greg.1.anderson’s picture

Title: Cannot Download Modules » Temp directory usage on Windows (Cannot Download Modules)
Version: All-versions-3.3 »
Category: support » bug
Status: Postponed (maintainer needs more info) » Active
Issue tags: +Windows

Can you recommend a better temporary directory to use on Windows? An easy way for drush to work around this problem would be to just use a different temporary directory, perhaps a per-user temporary directory, and thereby avoid the Windows 7 Read-Only bug altogether.

The relevant code is in include/filesystem.inc; we just need to change drush_find_tmp(). I presume that drush is using c:\TEMP as the temp directory because this is what sys_get_temp_dir() is returning. You will notice that drush first tries to use c:\windows\temp or c:\winnt\temp and will prefer either of these if they exist and are writable. As an experiment, I would recommend that you create one of these directories and give it appropriate world-writable permissions, and see if that clears up your dl problems.

It would still be good to have drush switch to using another directory for Windows 7 to save other people from the grief this issue might cause.

As a final note, I will mention that hopefully everyone who is trying to use drush on Windows is using drush-5.x-dev; there are a lot of Windows bugfixes in master that have not been (and will not be, probably) backported to drush-4.

decibel.places’s picture

Title: Temp directory usage on Windows (Windows Read Only bug) » Temp directory usage on Windows (Cannot Download Modules)

All my directories on the filesystem have Read-only set and it cannot be unset through the properties tab or command line. As I said, it is a known Windows 7 bug. So switching temp directories does not work (but I have tried it).

Actually the relevant code is in function drush_find_tmp() in includes/drush.inc @ line 1600 - include/filesystem.inc does not exist in my Drush distro.

Able to download only:
by removing is_writable($directory) from:

    foreach ($directories as $directory) {
      if (is_dir($directory) && is_writable($directory)) {
        $temporary_directory = $directory;
        break;
      }
    }

so it reads:

    foreach ($directories as $directory) {
      if (is_dir($directory)) {
        $temporary_directory = $directory;
        break;
      }
    }

I am able to download the tarball of the recommended version to the Drupal site's root directory for manual unpacking and placement in the modules directory, then I can enable it with Drush:

C:\mysitelocal>drush --debug dl poormanscron
Bootstrap to phase 0. [0.04 sec, 1.76 MB]                            [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drush() [0.04 sec, 1.91 MB] [bootstrap]

Loading drushrc "C:\drush\drushrc.php" into "drush" scope. [0.05 sec,[bootstrap]

1.92 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.12 sec,    [bootstrap]

3.96 MB]
Initialized Drupal 6.22 root directory at C:/mysitelocal [0.14 sec,     [notice]

4.56 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.14 sec,    [bootstrap]

4.57 MB]
Initialized Drupal site default at sites/default [0.14 sec, 4.57 MB]    [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.16[bootstrap]

sec, 4.57 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.31 sec,[bootstrap]

4.6 MB]
Successfully connected to the Drupal database. [0.31 sec, 4.6 MB]    [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.33 sec,    [bootstrap]

4.86 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [5.54 sec,   [bootstrap]

24.49 MB]
Successfully logged into Drupal as Anonymous (uid=0) [5.58 sec, 24.51[bootstrap]

MB]
Found command: pm-download (commandfile=pm) [5.58 sec, 24.51 MB]     [bootstrap]

Initializing drush commandfile: user [5.58 sec, 24.52 MB]            [bootstrap]

Executing: wget --version
Downloading release history from                                        [notice]

http://updates.drupal.org/release-history/poormanscron/6.x [6.02 sec,
24.56 MB]
Executing: wget "http://updates.drupal.org/release-history/poormanscron/6.x"
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
  wgetrc_file_name = C:\.wgetrc
  --2011-06-17 10:53:11--  http://updates.drupal.org/release-history/poormanscro
n/6.x
  Connecting to 64.210.197.20:80... connected.
  Proxy request sent, awaiting response... 200 OK
  Length: 8968 (8.8K) [text/xml]
  Saving to: `6.x'

       0K ........                                              100% 73.1K=0.1s

  2011-06-17 10:53:11 (73.1 KB/s) - `6.x' saved [8968/8968]

Calling unlink(6.x)
Executing: mkdir "c:\windows\temp/drush_tmp_1308322391"
Downloading project poormanscron to                                     [notice]

c:\windows\temp/drush_tmp_1308322391 ... [6.63 sec, 24.56 MB]
Calling chdir(c:\windows\temp/drush_tmp_1308322391)
Executing: wget -P . "http://ftp.drupal.org/files/projects/poormanscron-6.x-2.2.
tar.gz"
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
  wgetrc_file_name = C:\.wgetrc
  --2011-06-17 10:53:11--  http://ftp.drupal.org/files/projects/poormanscron-6.x
-2.2.tar.gz
  Connecting to 64.210.197.20:80... connected.
  Proxy request sent, awaiting response... 200 OK
  Length: 9205 (9.0K) [application/x-gzip]
  Saving to: `./poormanscron-6.x-2.2.tar.gz'

       0K ........                                              100% 4.16M=0.002
s

  2011-06-17 10:53:12 (4.16 MB/s) - `./poormanscron-6.x-2.2.tar.gz' saved [9205/
9205]

Calling chdir(C:\mysitelocal)
Unable to download poormanscron-6.x-2.2.tar.gz to                        [error]

c:\windows\temp/drush_tmp_1308322391 from
http://ftp.drupal.org/files/projects/poormanscron-6.x-2.2.tar.gz [7.7
sec, 24.56 MB]
Error downloading poormanscron [7.7 sec, 24.56 MB]                      [notice]

Command dispatch complete [7.7 sec, 24.55 MB]                           [notice]

 Timer  Cum (sec)  Count  Avg (msec)
 page   7.549      1      7549.1

Peak memory usage was 24.59 MB [7.7 sec, 24.55 MB]                      [memory]


However in a different site it still doesn't work I get a simplexml_load_file() error:

c:\tgpdrupal>drush --debug dl poormanscron
Bootstrap to phase 0. [0.05 sec, 1.76 MB]                            [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drush() [0.05 sec, 1.91 MB] [bootstrap]

Loading drushrc "C:\drush\drushrc.php" into "drush" scope. [0.07 sec,[bootstrap]

1.92 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.15 sec,    [bootstrap]

3.96 MB]
Initialized Drupal 6.22 root directory at C:/tgpdrupal [0.16 sec,       [notice]

4.56 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.17 sec,    [bootstrap]

4.57 MB]
Initialized Drupal site default at sites/default [0.17 sec, 4.57 MB]    [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.18[bootstrap]

sec, 4.57 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.38 sec,[bootstrap]

4.6 MB]
Successfully connected to the Drupal database. [0.38 sec, 4.6 MB]    [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.39 sec,    [bootstrap]

4.86 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [5.5 sec,    [bootstrap]

28.89 MB]
Successfully logged into Drupal as Anonymous (uid=0) [5.5 sec, 28.89 [bootstrap]

MB]
Found command: pm-download (commandfile=pm) [5.5 sec, 28.89 MB]      [bootstrap]

Initializing drush commandfile: user [5.5 sec, 28.9 MB]              [bootstrap]

Executing: wget --version
Downloading release history from                                        [notice]

http://updates.drupal.org/release-history/poormanscron/6.x [5.53 sec,
28.94 MB]
Executing: wget "http://updates.drupal.org/release-history/poormanscron/6.x"
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
  wgetrc_file_name = C:\.wgetrc
  --2011-06-17 10:53:37--  http://updates.drupal.org/release-history/poormanscro
n/6.x
  Connecting to 64.210.197.20:80... connected.
  Proxy request sent, awaiting response... 200 OK
  Length: 8968 (8.8K) [text/xml]
  Saving to: `6.x'

       0K ........                                              100% 46.9K=0.2s

  2011-06-17 10:53:38 (46.9 KB/s) - `6.x' saved [8968/8968]

WD php: simplexml_load_file(): I/O warning : failed to load external     [error]

entity "6.x" in C:\drush\commands\pm\pm.drush.inc on line 2092. [6.17
sec, 29 MB]
Calling unlink(6.x)
WD php: unlink(6.x): No such file or directory in                        [error]

C:\drush\includes\drush.inc on line 1164. [6.18 sec, 29 MB]
Could not download project status information from                       [error]

http://updates.drupal.org/release-history/poormanscron/6.x [6.18 sec,
29 MB]
Command dispatch complete [6.19 sec, 28.98 MB]                          [notice]

 Timer  Cum (sec)  Count  Avg (msec)
 page   6.01       1      6009.67

Peak memory usage was 29.12 MB [6.19 sec, 28.98 MB]                     [memory]

My Drush Version:

drush_version=4.4

; Information added by drupal.org packaging script on 2011-03-14
version = "7.x-4.4"
core = "7.x"
project = "drush"
datestamp = "1300145167"

greg.1.anderson’s picture

Title: Temp directory usage on Windows (Cannot Download Modules) » Temp directory usage on Windows (Windows Read Only bug)

drush-4 and Windows is an unsupported configuration. Any code changes to support Windows will have to happen in the 5.x-dev branch. Once we get a change into 5.x, we can discuss a backport, but only if it is possible to do more-or-less in isolation (does not depend to heavily on other Windows fixes that are not going to be backported).

Bummer that the ro bit gets set on every directory in the filesystem. Can I take it from your message above that the php function is_writable('path') returns FALSE for all directories, but it is possible to write to some directories even though is_writable claims that you cannot?

If is_writable('path') returns FALSE for all directories (on a machine exhibiting the Windows Read Only bug), is there some other sanctioned way to determine if the folder is actually writable? Do we have to do something like this?

function drush_is_writable($path) {
  $result = is_writable($path);
  if (($result === FALSE) && drush_is_windows() && (is_dir($path))) {
    $testfile = $path . '/drush-test-write.tmp'; // something more random
    file_write_contents($testfile, 'test');
    $result = file_exists($testfile);
    unlink($result);
  }
  return $result;
}
decibel.places’s picture

Title: Temp directory usage on Windows (Cannot Download Modules) » Temp directory usage on Windows (Windows Read Only bug)

tried the drush_is_writable() function

function drush_is_writable($path) {
  $result = is_writable($path);
  if (($result === FALSE) && drush_is_windows() && (is_dir($path))) {
    $testfile = $path . '/drush-test-write.tmp'; // something more random
    file_write_contents($testfile, 'test');
    $result = file_exists($testfile);
    unlink($result);
  }
  return $result;
}
/**
 * Returns the path to a temporary directory.
 *
 * This is a custom version of file_directory_path().
 * We can't directly rely on sys_get_temp_dir() as this
 * path is not valid in some setups for Mac.
 */
function drush_find_tmp() {
.
.
.
    foreach ($directories as $directory) {
      if (is_dir($directory) && drush_is_writable($directory)) {
        $temporary_directory = $directory;
        break;
      }
    }

with the same result, tarball is downloaded to Drupal home directory

C:\mysitelocal>drush status
 Drupal version         :  6.22
 Site URI               :  http://default
 Database driver        :  mysqli
 Database hostname      :  127.0.0.1
 Database username      :  o2drupal
 Database name          :  mysite
 Database               :  Connected
 Drupal bootstrap       :  Successful
 Drupal user            :  Anonymous
 Default theme          :  garland
 Administration theme   :  rootcandy
 PHP configuration      :  C:\xampp174\php\php.ini
 Drush version          :  4.4
 Drush configuration    :  C:\drush\drushrc.php
 Drush alias files      :
 Drupal root            :  C:/mysitelocal
 Site path              :  sites/default
 File directory path    :  sites/default/files


C:\mysitelocal>drush --debug dl poormanscron
Bootstrap to phase 0. [0.04 sec, 1.77 MB]                            [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drush() [0.04 sec, 1.92 MB] [bootstrap]

Loading drushrc "C:\drush\drushrc.php" into "drush" scope. [0.06 sec,[bootstrap]

1.92 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.12 sec,    [bootstrap]

3.96 MB]
Initialized Drupal 6.22 root directory at C:/mysitelocal [0.14 sec,     [notice]

4.57 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.14 sec,    [bootstrap]

4.57 MB]
Initialized Drupal site default at sites/default [0.14 sec, 4.57 MB]    [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.15[bootstrap]

sec, 4.57 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.31 sec,[bootstrap]

4.6 MB]
Successfully connected to the Drupal database. [0.31 sec, 4.6 MB]    [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.32 sec,    [bootstrap]

4.86 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [1.94 sec,   [bootstrap]

24.5 MB]
Successfully logged into Drupal as Anonymous (uid=0) [1.94 sec, 24.52[bootstrap]

MB]
Found command: pm-download (commandfile=pm) [1.94 sec, 24.52 MB]     [bootstrap]

Initializing drush commandfile: user [1.94 sec, 24.52 MB]            [bootstrap]

Executing: wget --version
Downloading release history from                                        [notice]

http://updates.drupal.org/release-history/poormanscron/6.x [1.97 sec,
24.56 MB]
Executing: wget "http://updates.drupal.org/release-history/poormanscron/6.x"
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
  wgetrc_file_name = C:\.wgetrc
  --2011-06-17 11:12:07--  http://updates.drupal.org/release-history/poormanscro
n/6.x
  Connecting to 64.210.197.20:80... connected.
  Proxy request sent, awaiting response... 200 OK
  Length: 8968 (8.8K) [text/xml]
  Saving to: `6.x'

       0K ........                                              100% 48.5K=0.2s

  2011-06-17 11:12:08 (48.5 KB/s) - `6.x' saved [8968/8968]

Calling unlink(6.x)
Executing: mkdir "c:\windows\temp/drush_tmp_1308323528"
Downloading project poormanscron to                                     [notice]

c:\windows\temp/drush_tmp_1308323528 ... [2.54 sec, 24.56 MB]
Calling chdir(c:\windows\temp/drush_tmp_1308323528)
Executing: wget -P . "http://ftp.drupal.org/files/projects/poormanscron-6.x-2.2.
tar.gz"
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
  wgetrc_file_name = C:\.wgetrc
  --2011-06-17 11:12:08--  http://ftp.drupal.org/files/projects/poormanscron-6.x
-2.2.tar.gz
  Connecting to 64.210.197.20:80... connected.
  Proxy request sent, awaiting response... 200 OK
  Length: 9205 (9.0K) [application/x-gzip]
  Saving to: `./poormanscron-6.x-2.2.tar.gz'

       0K ........                                              100% 5.57M=0.002
s

  2011-06-17 11:12:08 (5.57 MB/s) - `./poormanscron-6.x-2.2.tar.gz' saved [9205/
9205]

Calling chdir(C:\mysitelocal)
Unable to download poormanscron-6.x-2.2.tar.gz to                        [error]

c:\windows\temp/drush_tmp_1308323528 from
http://ftp.drupal.org/files/projects/poormanscron-6.x-2.2.tar.gz
[3.05 sec, 24.57 MB]
Error downloading poormanscron [3.05 sec, 24.57 MB]                     [notice]

Command dispatch complete [3.05 sec, 24.55 MB]                          [notice]

 Timer  Cum (sec)  Count  Avg (msec)
 page   2.905      1      2904.87

Peak memory usage was 24.59 MB [3.05 sec, 24.55 MB]                     [memory]

Drush 4.4 runs fine on my personal computer with Windows 7; I am having this problem at my work desktop where I have full admin privileges but I cannot reinstall Windows without tech support.

I tried Drush 3.3 and got errors:

c:\tgpdrupal>drush status
 Drupal version         :  6.22
 Site URI               :  http://default
 Database driver        :  mysqli
 Database hostname      :  127.0.0.1
 Database username      :  o2drupal
 Database name          :  tgpnew
 Database               :  Connected
 Drupal bootstrap       :  Successful
 Drupal user            :  Anonymous
 Default theme          :  tgpnew
 Administration theme   :  rootcandy
 PHP configuration      :  C:\xampp174\php\php.ini
 Drush version          :  3.3
 Drush configuration    :  C:\drush\drushrc.php
 Drupal root            :  C:/tgpdrupal
 Site path              :  sites/default
 File directory path    :  sites/default/files


c:\tgpdrupal>drush --debug dl ds
Found command: pm-download (commandfile=pm) [0.1 sec, 2.7 MB]        [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.1 sec, 2.71[bootstrap]

MB]
Initialized Drupal 6.22 root directory at C:/tgpdrupal [0.11 sec,       [notice]

3.32 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.11 sec,    [bootstrap]

3.33 MB]
Initialized Drupal site default at sites/default [1.46 sec, 3.53 MB]    [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [1.46[bootstrap]

sec, 3.53 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [1.62 sec,[bootstrap]

3.53 MB]
Successfully connected to the Drupal database. [1.62 sec, 3.53 MB]   [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_full() [1.65 sec,    [bootstrap]

3.79 MB]
PHP Fatal error:  Call to undefined function filter_xss() in C:\tgpdrupal\includ
es\common.inc on line 694
session_start(): Cannot send session cookie - headers already sent by  [warning]

(output started at C:\drush\includes\drush.inc:820)
bootstrap.inc:1161 [1.65 sec, 3.86 MB]
session_start(): Cannot send session cache limiter - headers already   [warning]

sent (output started at C:\drush\includes\drush.inc:820)
bootstrap.inc:1161 [1.65 sec, 3.86 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:725 [1.67
sec, 4.76 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:726 [1.67
sec, 4.76 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:727 [1.67
sec, 4.76 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:728 [1.67
sec, 4.77 MB]

Fatal error: Call to undefined function filter_xss() in C:\tgpdrupal\includes\co
mmon.inc on line 694
Drush command could not be completed. [1.73 sec, 7.18 MB]                [error]


c:\tgpdrupal>cd c:\mysitelocal

c:\mysitelocal>drush --debug dl ds
Found command: pm-download (commandfile=pm) [0.07 sec, 2.7 MB]       [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.08 sec,    [bootstrap]

2.71 MB]
Initialized Drupal 6.22 root directory at C:/mysitelocal [0.08 sec,     [notice]

3.32 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.08 sec,    [bootstrap]

3.33 MB]
Initialized Drupal site default at sites/default [1.46 sec, 3.53 MB]    [notice]

Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [1.46[bootstrap]

sec, 3.53 MB]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [1.64 sec,[bootstrap]

3.53 MB]
Successfully connected to the Drupal database. [1.64 sec, 3.53 MB]   [bootstrap]

Drush bootstrap phase : _drush_bootstrap_drupal_full() [1.65 sec,    [bootstrap]

3.79 MB]
PHP Fatal error:  Call to undefined function filter_xss() in C:\mysitelocal\incl
udes\common.inc on line 694
session_start(): Cannot send session cookie - headers already sent by  [warning]

(output started at C:\drush\includes\drush.inc:820)
bootstrap.inc:1161 [1.67 sec, 3.86 MB]
session_start(): Cannot send session cache limiter - headers already   [warning]

sent (output started at C:\drush\includes\drush.inc:820)
bootstrap.inc:1161 [1.67 sec, 3.86 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:725 [1.71
sec, 4.75 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:726 [1.71
sec, 4.75 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:727 [1.71
sec, 4.75 MB]
Cannot modify header information - headers already sent by (output     [warning]

started at C:\drush\includes\drush.inc:820) bootstrap.inc:728 [1.71
sec, 4.76 MB]

Fatal error: Call to undefined function filter_xss() in C:\mysitelocal\includes\
common.inc on line 694
Drush command could not be completed. [4.5 sec, 7.17 MB]                 [error]

Yes, I can write to the directories normally, but it seems that PHP is having a problem, and I am running PHP as administrator.

For now, downloading the tarball of the recommended version and manually moving it is the best I can do. I can use Drush on the remote LAMP server fine. It's just local dev that is a pita.

Tried Using Public Folders

I tried using the Windows Public folder as suggested in the article about the Windows 7 Read-only Bug and I even tried using my Dropbox/Public folder. No luck, they are also set Read-only, btw.

greg.1.anderson’s picture

Seems to me that since the Windows Read Only bug is caused by writing stuff to c:\, that it is unwise to store all of your sites there. However, if I understand the WROB correctly, once it happens, your whole computer is affected until the problem is fixed, and the normal workarounds are not working for you, so moving your sites probably won't help you unless you do a reinstall.

Regarding the undefined function filter_xss error, try the patch at #1174496: WSOD: drupal_error_handler() assumes filter_xss() is defined. It probably won't solve your primary problem, but will help avoid this spurious error when running drush in debug mode.

greg.1.anderson’s picture

Category: bug » support
Status: Active » Postponed (maintainer needs more info)

Note that temporary directory improvements for Windows were committed as part of #955768: drush.bat lacks sandwich making in Windows. This may improve some of the symptoms above.

I'm not sure there is anything else we can do about the Windows Read-Only bug; please re-open with any additional information or proposed patches.

jhr’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

novice triaged - feel free to reopen