Problem/Motivation

Windows tries to download tar.gz updates rather than .zip with this error:

"HTTP error 0 occurred when trying to fetch..." when updating modules on Windows 10"

I am using Drupal 7.41. I tried to use the Drupal web interface (as admin) to update modules, such as CKEditor and FieldGroups on my WINDOWS 10 system. It appears that update is trying to download the tar.gz files (for LINUX) instead of the ZIP files for windows. Hence the update fails. This did not happen under Windows 7. How can I fix this? I KNOW I can do the updates manually, via FTP, but I need to use the built-in support so I can turn this responsibility over to a non-programmer. Also, doing it manually requires me to login on the actual system running Drupal.

The error also occurs when using drush. The modules have to be manually downloaded via FTP, before the command works.

Here are the error messages I get:
•HTTP error 0 occurred when trying to fetch https://ftp.drupal.org/files/projects/field_group-7.x-1.5.tar.gz.
•HTTP error 0 occurred when trying to fetch https://ftp.drupal.org/files/projects/ckeditor-7.x-1.17.tar.gz.

Proposed resolution

#6 has the likely solution. As a result, this issue has been retitled. Document that mod_mime_magic is needed on some platforms.

Remaining tasks

CommentFileSizeAuthor
#8 2699209-8.patch567 byteschishah92
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DocDJ-forum created an issue. See original summary.

Vinay15’s picture

Hi there,

This looks like a ownership / permissions problem. Make sure to set the ownership of the drupal root folder and underlying files to the webserver's user.

Also, make sure that the "temporary" and the "private" folders are setup correctly and with the right permissions (if in doubt, just test by assigning read, write and execute permissions - don't forget to lower them to your requirements afterwards).

Thanks,
Vinay

DocDJ-forum’s picture

This is a Windows installation and as so permissions were set and working a long time ago. The downloads used to come in .zip format. Now that I am on Windows 10, the updater appears to be broken.

cilefen’s picture

Title: updating modules with Drupal update manager » Cannot update modules on Windows 10
Issue tags: -Update manager +Windows

There are other discussions about this error.

cilefen’s picture

Title: Cannot update modules on Windows 10 » "HTTP error 0 occurred when trying to fetch..." when updating modules on Windows 10
DocDJ-forum’s picture

uncommenting

LoadModule mime_magic_module modules/mod_mime_magic.so

in Apache's httpd.conf appears to be the solution.

cilefen’s picture

Title: "HTTP error 0 occurred when trying to fetch..." when updating modules on Windows 10 » Document that mod_mime_magic is needed on some platforms
Category: Bug report » Task
Issue summary: View changes
Issue tags: +Documentation, +Apache
chishah92’s picture

Assigned: Unassigned » chishah92
Status: Active » Needs review
FileSize
567 bytes

Documented in INSTALL.txt in this patch.

Thanks!
Chirag

cilefen’s picture

Status: Needs review » Needs work

Thank you for the patch and I think we need someone to confirm that #6 is true.

  1. This configuration is not optional on these platforms so I am not sure OPTIONAL SERVER REQUIREMENTS is the best section.
  2. It looks like the sentence you typed is not finished.
  3. I am not sure INSTALL.txt is the best place for this documentation. Perhaps the requirements page instead.
chishah92’s picture

Hi cilefen ,

Thanks for reviewing , so ignore this patch if we don't want to document in INSTALL.txt . Lets see if get any confirmation on #6 so that we can edit in the requirements page.

Thanks!
~Chirag

DocDJ-forum’s picture

I was able to check this on another system that has Apache 2.4 and it didn't solve the problem. So we're back to square one, at least with Drupal 7.x.

DocDJ-forum’s picture

I just did a check for updates on D8.1.2 and when I hovered my mouse over the download link, the link was for a tar.gz file, so this is still a problem on both 7.43 and 8 on WIndows 10.

pkosenko’s picture

Just to make a note . . . I have been living with this issue for a long while with Drupal 7 on Windows 7. At some point the module update UI just started to fail on Windows. I can still not figure out why. It is not a browser issue (happens in both Firefox and Chrome) or a site issue (ftp.drupal.org pings just fine). It is not a directory permission issue. The temp directory has write permissions. It must be something inside of Drupal itself when it is running on Windows. And it has apparently never been fixed.

My solution has been to use Drush for downloading in updating modules on my localhost installations -- "$ drush dl module_name" seems to work fine.

DocDJ-forum’s picture

I DO have mod_mime_magic loaded and the failure still occurs. I have also installed Drupal 8 and have the same problem.
Here is the error I get (for Ctools in this case or any other module):
Failed to fetch file due to error: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)

Downloading updates failed:
•Failed to download ctools from https://ftp.drupal.org/files/projects/ctools-8.x-3.0.tar.gz

DocDJ-forum’s picture

When I hover over the "download" link, THIS is what shows up:
https://ftp.drupal.org/files/projects/drupal-8.3.2.tar.gz

So it appears that the update module does not know it is running on Windows. IT will take more than just loading mod_mime_magic to fix this.
I am not very familiar with PHP, or the internal structure of Drupal module execution, so I can't go through the code for Update myself.

Version: 7.41 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.