createPDF HTTP_HOST php error

Re: [markr] createPDF HTTP_HOST php error

By Jason - February 15, 2012

Hi,

It looks like your server doesn't set the server variable HTTP_HOST. If you only experience this problem with a single server, you can always replace this code with a hard coded value.

For example, instead of:

$GLOBALS['CREATEPDF_TEMPDIR_URL'] = "http://{$_SERVER['HTTP_HOST']}" . dirname($_SERVER['SCRIPT_NAME']);

you could use:

$GLOBALS['CREATEPDF_TEMPDIR_URL'] = "http://mySite.com/cmsAdmin/plugins/createPDF";

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [markr] createPDF HTTP_HOST php error

By Dave - February 15, 2012

That's really odd, are you using a standard browser to access the page that generates the PDF? HTTP_HOST is a standard header.
Dave Edis - Senior Developer
interactivetools.com