XF 1.1 css.php not being loaded when using HTTPS in Chrome

TVictory

New member
For some reason when i got to https://mysite.faux/forum/ in chrome the css.php files do not load, looking at the network tab of chrome, i don't even see it even try to load. Its not 404 or anything. Works fine in FF.

<link rel="stylesheet" href="css.php?css=xenforo,form,public...." />
<link rel="stylesheet" href="css.php?css=bb_code,facebook,login_bar,message,message_user_info,...8" />

If i click on those links in view source they load just fine. Why would css.php not be loaded on https?
 
What is your forum URL? I want to test this.

It's probably a client issue. I myself have encountered CSS loading problems that are fixed by restarting the browser.
 
The base href is not using SSL:

Code:
<base href="http://footballbeast.com/forum/" />

That might be causing this. Chrome might block insecure elements on a secure page.

Is this template customized?

Admin CP -> Appearance -> Templates -> PAGE_CONTAINER

Try reverting it.

The base tag in that template should automatically include https on a secure page, but for some reason yours is not. I supposed you could hard-code the base href by editing that template, but that requires enforcement of the same base URL through rewrite rules.

I looked in the code to see where the secure check might be failing. The code is looking for a _SERVER variable called:

_SERVER["HTTPS"]

Visit your phpinfo page (using https) and make sure this _SERVER variable is showing on that page. The phpinfo page is at:

admin.php?tools/phpinfo

If the variable is not present then that means PHP is not correctly reporting it which explains your problem. In that case you should contact your host or server person. Or if there is another variable that is being set instead of HTTPS then perhaps you can manually compensate with a config edit similar to this:

http://xenforo.com/community/threads/always-1-guest-online.23143/#post-287685
 
Great! We were using a different name for the HTTPS server variable do to the way we were reverse proxying nginx to apache. By manually copying the forwarded $_SERVER variable at the php layer it fixed the <base> tag and now it works.

Code:
$_SERVER['HTTPS'] = (isset($_SERVER['HTTP_X_FORWARDED_HTTPS']));

Thanks so much for your help!
 
Back
Top Bottom