Secure_Pages was not recognizing that it was on a secure connection. When I checked php_info and noted that $_SERVER['HTTPS'] is set to '1' rather than to 'on' which is what secure_pages expects. I edited the securepages_is_secure function to check if it is 'on' OR 1 and the module worked fine.

I know I should create a patch for this, but I'm not setup to do that right now. I may try and create it later.

Thanks

CommentFileSizeAuthor
#2 securepages-n964322.patch692 bytesdamienmckenna

Comments

webgeer’s picture

I should have mentioned that my site is hosted on 1and1. The version of php is: PHP Version 5.2.14

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new692 bytes

Here's a quick patch for this.

mike503’s picture

Why not typecast to an int or boolean or something? Normalize it?

grendzy’s picture

Status: Needs review » Closed (duplicate)

Hi, I've opened a new issue to centralize this discussion:
#1096744: Document support for proxies and non-standard web server configurations

In the meantime, details on how to configure non-standard servers for securepages can be found here:
http://www.metaltoad.com/blog/running-drupal-secure-pages-behind-proxy

BTW $_SERVER['HTTPS'] is set by Apache. If you know what specific conditions cause it to be "1" instead of "on" please let me know so I can add it to the docs.