The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

getenv() issue

Discussion in 'General Discussion' started by KarlP818, Sep 21, 2005.

  1. KarlP818

    KarlP818 Member

    Joined:
    Jun 21, 2005
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Recently one of our server had another strange problem, of sorts. We use osC as our main shopping cart, but today all of a sudden the images wouldn't show up at all. The text was all there, but not the images. For those of you who know about osC, we further investigated the problem and found that the HTTPS_* variables were not set, but that was ok because these sites didn't have an SSL certificate installed. When we put http://www.domain.com into the HTTPS url constant, the site started working again.

    I went to try and find out why this was happening, and eventually found the spot where osC decides to use either the HTTPS or HTTP url. It looks something like

    Code:
    if (getenv('HTTPS') == "on")
    //HTTPS
    else
    //HTTP
    When i accessed the site through http://www.domain.com (note http, not https), the HTTPS environ variable was set to on. Why could this be happening?
     
  2. simplybe

    simplybe Well-Known Member

    Joined:
    Nov 29, 2002
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    same problem here , not found a solution yet. Been through the config and everything seems fine.
    It only happens when cpanel restarts apache, if you manually restart apache through ssh or whm it's fine.
     
Loading...

Share This Page