Page 1 of 1

migrate to new server with https, printing blank pages

Posted: Tue Sep 03, 2013 10:26 am
by whoey
So I am trying to migrate a site to a new host. The new server has the htdocs setup as https, and I have added
$config['root_url'] = 'https://newserver.com';

to the config file (as well as relevant new DB info)

CMSMS 1.11.7
PHP 5.4.17

When I access the site and click the printer friendly page icon I get a blank page (the template HTML is generated with no content)

If I remove the root_url from the config Printer Friendly pages now work, however the /admin styling and access now seems broken, and I cannot login, in fact the whole admin section looks printer friendly ala 1984 when I'm already logged in.

Having the same setup on the same server but different non https domain (ie: http://subdomain.newserver.com) everything works as it should. I'm really at a loss as to how to fix this apart from suggesting the new site be just http instead of https.

I trawled around the forums looking for solutions and the Printer Friendly issue brought me to the URL Rewriting issue, testing the above to in fact prove my suspicions.

Anyone have any thoughts?

Re: migrate to new server with https, printing blank pages

Posted: Fri Sep 20, 2013 4:06 pm
by whoey
So I guess I'm the only one with these issues?

Re: migrate to new server with https, printing blank pages

Posted: Fri Sep 20, 2013 4:34 pm
by whoey
Ok, silly me, I should really look at errorlogs when trying to fix things.

Line 94 of modules/CMSPrinting/CMSPrinting.module.php :

Code: Select all

$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
needs to be fixed, in my case everything is HTTPS, so adding the s solved everything for me here. Perhaps this should be pulling the $config['root_url'] instead?