2
votes

I have installed Drupal on Windows 2012 R2 (IIS 8.5) on my DEV and TEST servers. They are clean / out-of-the-box installations. My DEV environment is working fine, but I can’t install modules on my TEST environment. I’ve gone over the installations trying to figure out what is different, but I’ve been beating my head against the wall and they seem identical. Clearly they are not.

Problem

When installing a module, I get this error:

Installation failed! See the log below for more information.

module_filter

•Error installing / updating

•File Transfer failed, reason: /mysite.com/sites/all/modules is outside of the /mysite.com

(Note this is from the Authorize.php)

The permission on my public download folder seems fine – the module uploads and extracts just fine.

My public file system path is set to “sites/default/files” and my temporary directory is set to “sites/default/files/tmp”.

I can't figure out why it thinks the modules folder is outside of my root site!

I’m stumped. Any help would be appreciated!!!

Thanks

Tom Hundley

1

1 Answers

3
votes

Solution

As it turns out, this is a bug in Drupal running on IIS. The checkPath method of filetransfer.inc. is case-sensitive, so depending on how you setup the site in IIS, it might work or it might not work! This explained why things work on my DEV environment but not TEST.

Edit the checkPath method in includes/filetransfer/filetransfer.inc and add this code:

$full_path = strtolower($full_path);
$full_jail = strtolower($full_jail);

just before the path comparison:

if ($full_jail !== $full_path) { ... }

FIXED!

References

A HUGE thanks goes out to "sevenares" for posting the solution to this problem here: https://www.drupal.org/node/1071870#comment-8507091

I hope this helps someone.

Happy coding, Tom Hundley