Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When attempting to download updates the following error is given (example for trying to update the media module from 7.x-2.10 to 7.x-2.11):
HTTP error 0 occurred when trying to fetch https://ftp.drupal.org/files/projects/media-7.x-2.11.tar.gz.
Downloading updates failed:
Failed to download media from https://ftp.drupal.org/files/projects/media-7.x-2.11.tar.gz
Updates were working fine before and no changes have been made to the file system.
Comments
Comment #2
Guido Forks CreditAttribution: Guido Forks as a volunteer commentedI'm having exactly the same problem today, nothing has changed as far as I know on my system, using Windows 10.
Comment #3
cilefen CreditAttribution: cilefen as a volunteer commentedCould this be related to #2907021: Error by Update Modules and Theme?
Comment #4
mjkovacevich CreditAttribution: mjkovacevich as a volunteer commentedDon't think its related to https://www.drupal.org/node/2907021. Hosting provider seems to be running PHP 5.4.42, cURL 7.19.7 and OpenSSL 1.0.2a. Not sure how to check for TLS 1.2.
Comment #5
cilefen CreditAttribution: cilefen as a volunteer commentedHow do you know it is not related? The timing matches.
Comment #6
JAINV18 CreditAttribution: JAINV18 as a volunteer commentedHello, I also faced this situation and I found the temporary solution for this problem.
It seems this problem is cause by safemode directive and limitation of Drupal to handle it. For more information please visit these pages:
http://drupal.org/node/1267240
http://drupal.org/project/issues/drupal?text=safe+mode&status=All&versio...
Solution:
Simply turn off the safemode directive off in php.ini
Step by Step Explanation:
1. You need to have php.ini file. If don't, ask your webhost if you're allowed to have it.
2. Set your website to maintenance mode.
3. Backup your php.ini.
4. Edit the php.ini and set safemode to off.
5. Save/upload the 'edited' php.ini file to your website.
6. Make sure the php.ini file permission is 755.
7. Goto Report section and perform the module updates.
8. Fix if there still any issue reported.
9. Quit the maintenance mode.
So far, everything is working fine on my website. Please do necessary backup before you try this solution.
Comment #7
OMD CreditAttribution: OMD commentedI'm having this exact problem and exactly the same error message as well, but across all my Drupal 7 websites, even those in development just sitting on my local set up in MAMP.
Comment #8
dmaclachlan CreditAttribution: dmaclachlan commentedI'm having the exact same issue. It doesn't appear to be "safe_mode" - it's already set to OFF in my php.ini file. Also, file permissions for /tmp appear to be correct. Help?
Comment #9
JAINV18 CreditAttribution: JAINV18 as a volunteer commented@dmaclachlan - can you check if your php.ini file is with 755 permission
Comment #10
Nux CreditAttribution: Nux as a volunteer commentedIf you are getting error 0 then it's probably something wrong with OpenSSL (if you would be getting -13 then OpenSSL extension might not be enabled).
To debug problems you can attempt to run below code (just put it in a file on your server and run it in your browser or even with command line).
To run from cmd/bash use `php" -f "ssl_test.php"` (assuming you named the file `ssl_test.php`).
If you will get an error like: "SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version" then your OpenSSL is probably too old or something like that.
In any case you will get a lot more information to work with.
BTW. The `$options` is exactly what is used during module update. You can add some debug in `function drupal_http_request` after call to `stream_socket_client`. E.g.:
Comment #11
dmaclachlan CreditAttribution: dmaclachlan commentedSorry for the long delay in responding. Yes, php.ini is set to 755.