createPDF

By Toledoh - August 30, 2010

Hi Guys.

The createPDF seems to be working... mostly.

The test files are creating the PDF, however for everything other than the "url_as..." the displayed result is a PDF of my 404 error page.

Any ideas?
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] createPDF

By Jason - August 31, 2010

Hi Tim,

What is the url that you're passing to the plugin? Check to make sure that's correct first.

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: [Jason] createPDF

By Toledoh - August 31, 2010

Attachments:

html_as_inline.php 1K

Re: [Toledoh] createPDF

By Jason - August 31, 2010

Hi Tim,


Could you also attach url_as_inline.php so I can see how they're different?

You can also try adding this code to the very top of html_as_inline.php:

<?php require_once "../../../lib/viewer_functions.php"; ?>

Give that a try.
---------------------------------------------------
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: [Jason] createPDF

By Toledoh - August 31, 2010

Hi Jason.

I had deleted that line just to see if that was the issue...

Attached are the url versions.
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] createPDF

By Toledoh - August 31, 2010

BTW: have just emailed ftp etc in case you need it.
Cheers,

Tim (toledoh.com.au)

Re: [Toledoh] createPDF

By Jason - September 1, 2010

Hi Tim,

I've take a look and haven't been able to find a problem. The plugin works correctly as it does create a pdf. It doesn't seem to produce any errors and all of the tests show that the server does support the plugin.

Before doing the conversion to pdf, the plugin writes the output to a temporary html file. Do you have any .htaccess redirects that affect how .html files are displayed? It is possible that this redirect is what's redirecting to your 404 page.

Let me know. If not, I'll look into this further.

Thanks.
---------------------------------------------------
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: [Jason] createPDF

By Chris - September 1, 2010 - edited: September 1, 2010

Hi Tim,

Wow, this was a tricky one! :)

Your server is configured in a funny way, which is preventing the Create PDF plugin from functioning. When a script on your server makes a web request on http://www.murraysbrewingco.com.au/, it ends up going someplace completely different!

When you ask the internet what the IP address of www.murraysbrewingco.com.au is, you'll be told it's [url http://www.iptools.com/dnstools.php?tool=hostresolve&user_data=www.murraysbrewingco.com.au&submit=Go]116.213.5.16[/url]. However, when you ask the web server running on www.murraysbrewingco.com.au what the IP address of www.murraysbrewingco.com.au is, you'll be told it's [url http://www.murraysbrewingco.com.au/ip_test.php]203.30.164.196[/url]!

I've uploaded a simple script to show the problem:

[url http://www.murraysbrewingco.com.au/web_get_test.php]http://www.murraysbrewingco.com.au/web_get_test.php[/url]

The script attempts to download http://www.murraysbrewingco.com.au/web_get_test_target.php, which is a file that simply reads "IT WORKS". On your server, the test shows nothing.

(Another clue is that the PDF generated by the [url http://www.murraysbrewingco.com.au/cmsAdmin/plugins/createPDF/tests/html_as_inline.php]html_as_inline test[/url] is a different error page ("Woops!") than the [url http://www.murraysbrewingco.com.au/x]error page[/url] you get from 404s on www.murraysbrewingco.com.au ("Error occurred") from a web browser.)

Please ask your web host to fix your server so that it can make web requests of itself. If you show them the web_get_test.php script above, they should be able to figure it out.

I hope this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [Toledoh] createPDF

Thanks for your direction guys... there was some kind of conflict with the host. I had moved from one to another and the old one was still half set up some how.

Works a treat now.
Cheers,

Tim (toledoh.com.au)