0

My client has a VPS at Network Solutions. When looking at phpinfo() on a https:// page, I should be able to see the HTTPS server variable set to the string 'on' but the HTTPS variable does not exist. If I do a search for 'https' on the phpinfo() generated page, it only shows up next to 'Registered PHP Streams'

Maybe PHP was compiled without HTTPS support?

2 Answers 2

0

Something other than httpd could be handling the HTTPS, so httpd doesn't know that it should set the variable.

5
  • How do I find out?
    – Rob Decker
    Oct 27, 2010 at 19:48
  • 1
    Generally you'd ask the client. Presumably someone there should have some record of how the system is set up. Oct 27, 2010 at 19:52
  • Check _SERVER["SERVER_SOFTWARE"] on phpinfo()'s output.
    – ahill
    Oct 27, 2010 at 19:53
  • I'd ask Network Solutions, but they are clueless.
    – Rob Decker
    Oct 27, 2010 at 21:44
  • The only thing in _SERVER["SERVER_SOFTWARE"] is Apache/2.2.6 (Fedora)
    – Rob Decker
    Oct 27, 2010 at 21:45
0

This is a response from Network Solutions regarding the matter:

Our proxy SSL doesn't allow server-side variables to detect HTTPS (secure). All server-side coding will always detect HTTP (non-secure), and for programs that attempt to redirect non-secure connections (http://) to a secure connection (https://) will result in an infinite loop and server error after 30 seconds.

The only ways around this is to assume the connection is secure by making all the links to the sensitive pages https, or use a client-side program (like javascript) to detect if it's secure and redirect if it's not. The coding below will do just that. Just modify it to redirect to the correct secure domain and add it into the HTML of any sensitive pages.

<script language="javascript"> if (document.location.protocol != "https:") { document.location.href = "https://secure.domain.com" + document.location.pathname; }; </script>

We also offer VPS hosting if you are comfortable with running your own server and it is a better suit for your needs.

Obviously not an ideal solution!

You must log in to answer this question.