I get an AJAX error whenever I try to install a module or update modules (uses authorize.php):

An AJAX HTTP request terminated abnormally. Debugging information follows. Path: https://www.mydomain.com/authorize.php?batch=1&id=83&op=do StatusText: ResponseText: ReadyState: 4

The URL in the browser is http (the error says https). However, when I manually change the URL to https, it then works fine.

I've added authorize.php to the list of pages to secure, but it still doesn't work.

I also have "Switch back" enabled.

Comments

MrPeanut’s picture

FWIW, I use Webfaction as my host and they told me this:

If it is of any help, one thing that is different on the WebFaction host is that we set the X-Forwarded-SSL HTTP variable when the user is connecting via an HTTPS URL. On other host infrastructures (particularly, those without an Nginx front-end which handles SSL and then proxies to an Apache back end), those hosts will specifically set the "HTTPS" variable instead. So if the module is somehow depending on this HTTPS variable directly, it may have issues on our platform

And provided this link: Apache conf http and https

grendzy’s picture

Assigned: Unassigned » grendzy
Priority: Normal » Major

I tested and also had problems using the update manager, although I got a different error ("No active batch.").

Regarding the information you got from Webfaction about the nginx proxy, you will need to adjust settings.php. Drupal's bootstrap process relies on the variable $_SERVER['HTTPS'].

if (isset($_SERVER['HTTP_X_FORWARDED_SSL']) &&
  $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
  $_SERVER['HTTPS'] = 'on';
}

A lengthy explanation is here: http://www.metaltoad.com/blog/running-drupal-secure-pages-behind-proxy

MrPeanut’s picture

Thanks, grendzy, for looking into the update manager.

I will adjust settings.php to match the Modify $_SERVER directly section from the webpage you provided (appears to be the same code you posted).

Out of curiosity, the site with SSL still works (and, as far as I could tell, it switches back and forth just like it's supposed to), so that would initially lead me to believe that I don't have to adjust my settings.php (I will anyway, but that would make me think I don't have to).

The site does take a long time to connect. Could this possibly be the reason? Maybe that's why I have to adjust settings.php. Thanks again!

grendzy’s picture

The settings.php question is puzzling, perhaps $_SERVER['HTTPS'] was already being set on your account. In any case the update manager not working is a significant problem!

MrPeanut’s picture

I adjusted settings.php to include:

if (isset($_SERVER['HTTP_X_FORWARDED_SSL']) &&
  $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on') {
  $_SERVER['HTTPS'] = 'on';
}

I am now also getting "No active batch." The site still seems to be incredibly slow to connect, but I think that's a separate issue. Thanks for the help with the settings.php!

greenwork’s picture

I actually have had to move away from updating online because of the no active batch. If anyone has any suggestions to fix that I would appreciate it. Now I am manually uploading and upacking then preforming the updates. Solves the update problem. Would be nice to have a one button click.

ksavoie’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta1

I can third this issue (with beta1). With this module in place I can no longer update modules.

bcobin’s picture

I've also given up here - there's generally no problem using Drush to update, but many users don't use Drush. Still a major issue, IMO.

greenwork’s picture

I am having to download manually. Ive done all the tweaking I can but still pushes to HTTPS even when on ignore.

nairb’s picture

I added *batch* to the Ignore Pages list and update works again.