createPDF HTTP_HOST php error

By markr - February 15, 2012

I still get a lot of use out of createPDF despite this error, however, does anyone else have this problem?

"PHP Notice: Undefined index: HTTP_HOST in /public_html/cmsAdmin/plugins/createPDF.php on line 23"

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/