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) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • 4.5.9 Extensions Warning
Pages: [1]

Author Topic: 4.5.9 Extensions Warning  (Read 1062 times)

FrTommy

  • I post frequently
  • ***
  • Posts: 273
  • Karma: 2
  • CiviCRM version: 4.5.x
  • CMS version: Drupal 7.x
  • MySQL version: 5.5.32
  • PHP version: 5.3
4.5.9 Extensions Warning
September 16, 2014, 08:19:30 am
On the Manage Extensions page, I cannot download extensions. I get a 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.

I use civihosting so everything should be set up correctly.

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Re: 4.5.9 Extensions Warning
September 16, 2014, 01:06:45 pm
FWIW, the warning is only relevant to some extensions -- it depends on how the extension is distributed. (Extensions distributed via github.com are generally affected because github always sends an HTTP redirect; other distributors often aren't affected.) When installing the extension, you should see some advanced details which include the download URL.

Generally, there are two possibilities:

  • Downloading files with HTTP redirection does not work in your PHP runtime. It can be fixed by changing the system config -- or by spending a few hours patching/testing CRM_Utils_HttpClient to use a work-around.
  • The system does actually support HTTP redirects but erroneously displays the message. In this case, one needs to change the conditional/test that it looks for ( https://github.com/civicrm/civicrm-core/blob/4.5/CRM/Utils/HttpClient.php#L216 ).

A few debugging techniques have come up in previous conversations:

  • Hack CRM_Utils_HttpClient::isRedirectionSupported() to force it to always return true; see if the extension downloads work
  • Print out & report the details used by isRedirectionSupported(). This can be done by temporarily creating/viewing a new .php file in the webroot like:

Code: [Select]
<?php
echo "<pre>";
var_dump(array(
  
'values' => array(
    
"ini_get('open_basedir')" => ini_get('open_basedir'),
    
"ini_get('safe_mode')" => ini_get('safe_mode'),
  ),
  
'conditions' => array(
    
"ini_get('open_basedir') == ''" =>  ini_get('open_basedir') == '',
    
"ini_get('safe_mode') == 'Off'" => ini_get('safe_mode') == 'Off',
    
"ini_get('safe_mode') == ''" => ini_get('safe_mode') == '',
    
"ini_get('safe_mode') === FALSE" => ini_get('safe_mode') === FALSE,
    
"(ini_get('safe_mode') == 'Off' || ini_get('safe_mode') == '' || ini_get('safe_mode') === FALSE)"
      
=> (ini_get('safe_mode') == 'Off' || ini_get('safe_mode') == '' || ini_get('safe_mode') === FALSE)
   ),
));

More discussion on the topic at https://issues.civicrm.org/jira/browse/CRM-14126 .

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Alpha and Beta Release Testing »
  • 4.5 Release Testing »
  • 4.5.9 Extensions Warning

This forum was archived on 2017-11-26.