CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Problem upgrading extensions in 4.5.2
Pages: [1]

Author Topic: Problem upgrading extensions in 4.5.2  (Read 601 times)

dudeval

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.32
  • MySQL version: 5.5.4
  • PHP version: 5.3
Problem upgrading extensions in 4.5.2
October 24, 2014, 11:23:48 pm
After recently upgrading our site from 4.4.6 to 4.5.2, the Manage Extensions page gives me the warning:

'WARNING: The downloader may be unable to download files which require HTTP redirection. This may be a configuration issue with PHP's open_basedir or safe_mode.'

Then, when I try to upgrade to CiviDiscount 3.0 by clicking 'Upgrade' in the yellow bar, and 'Download and Install' on the subsequent page, it repeats the warning and throws two errors:

'Unable to extract the extension' and
'Extension Upgrade Failed  Download failed - ZIP file is unavailable or malformed'

Same thing happens when I try to upgrade CiviVolunteer. Funny thing is that downloading and enabling native extensions that aren't advertising a new version being available seems to work fine- it's just the extensions with available upgrades that are giving the error.

Has anyone experienced similar problems? Or have any thoughts where to look for solutions? I didn't encounter this problem before the upgrade to 4.5.2.
Thanks.



dudeval

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.5.6
  • CMS version: Drupal 7.32
  • MySQL version: 5.5.4
  • PHP version: 5.3
Re: Problem upgrading extensions in 4.5.2
November 08, 2014, 10:13:43 am
In case anyone else stumbles on this with the same problem, I found the solution here:

https://issues.civicrm.org/jira/browse/CRM-14126

As per David's advice, I changed CRM_UTils_HttpClient::isRedirectSupported() to always return true by commenting out the lines below:

Code: [Select]
$ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $remoteFile);
    curl_setopt($ch, CURLOPT_HEADER, FALSE);
    curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
    curl_setopt($ch, CURLOPT_VERBOSE, 0);
//    if ($this->isRedirectSupported()) {
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
//    }
    if ($this->connectionTimeout !== NULL) {
      curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->connectionTimeout);
    }
    if (preg_match('/^https:/', $remoteFile) && $caConfig->isEnableSSL()) {
      curl_setopt_array($ch, $caConfig->toCurlOptions());
    }

This worked for me- and I was able to download and upgrade the extensions just fine.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Problem upgrading extensions in 4.5.2

This forum was archived on 2017-11-26.