createPDF installation problem

Hi Support
Just purchased the createPDF, installed it under CMSAdmin/plugins/createPDF (and the subfolders specified, ie, wktohtmlpdf and examples), but am getting the following messages when I test the server requirements.

Warning: shell_exec(): Unable to execute 'cd' in C:\Data\Websites\fordland.com.au\cmsAdmin\plugins\createPDF\createPDF.php on line 303
Failed! Run external program on server
Testing shell_exec() with command: cd
Result:
Error: No output returned from command!


Warning: exec(): Unable to fork ["C:\Data\Websites\fordland.com.au\cmsAdmin\plugins\createPDF\wkhtmltopdf\wkhtmltopdf.exe" -V] in C:\Data\Websites\fordland.com.au\cmsAdmin\plugins\createPDF\createPDF.php on line 341
Failed! Test running PDF conversion program on server
Testing pdf binary with command: "C:\Data\Websites\fordland.com.au\cmsAdmin\plugins\createPDF\wkhtmltopdf\wkhtmltopdf.exe" -V
Result: 0 bytes returned
Error: No output returned from command! (Exit code: -1)


Passed! Test downloading content from remote URL
Downloading content from url with: getPage('http://www.google.com/');
Result: HTTP status code 302


Warning: shell_exec(): Unable to execute 'SET "FIXPHPBUG=1" & "C:\Data\Websites\fordland.com.au\cmsAdmin\plugins\createPDF\wkhtmltopdf\wkhtmltopdf.exe" -q --disable-internal-links "http://www.google.com/" "C:\Data\Websites\fordland.com.au\cmsAdmin/_createPDF_temp25596.pdf" 2>&1' in C:\Data\Websites\fordland.com.au\cmsAdmin\plugins\createPDF\createPDF.php on line 125
Failed! Test converting a web page to a PDF
Created PDF with: HTML from: http://www.google.com/;
Result: 0 byte PDF returned
Error: No pdf output was returned!


Visually review PDF output
Visually inspect the PDF below, correct any error message, then make sure the graphics and fonts display as expected:


Any ideas?
Thanks

Re: [degreesnorth] createPDF installation problem

By Jason - August 16, 2010

Hi,

It sounds like an issue with your server settings. You should contact your hosting provider and ask them if the "shell_exec" function is enabled. If it isn't, they'll need to enable it for the plugin to work.

Also provide them with the output from the testing script.

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 installation problem

Hi Jason

With regards to this, the host company has advised that "As shell_exec is a very big security risk, they are unable to enable this command" - is this in fact a big security risk and if so, how?

Thanks

Re: [degreesnorth] createPDF installation problem

By Jason - August 24, 2010

Hi,

The plugin itself isn't a security risk. Having the shell_exec command enabled allows you to run Unix commands on the server, which could be a security risk. The only way to do that would be to have access to the server. So if the server is secure, everything is okay. Your host company may be concerned because enabling it would allow you to run any command you wanted, and they don't know what you'll do with that.

In the end though, that function needs to be enabled in order for the pdf plugin to work.

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: [degreesnorth] createPDF installation problem

Just for the record, I've run into the same issue with all three of the hosts we use regularly. None of them are willing to activate this function on a shared plan.

It's a shame as I have several projects which would like to implement this PDF writing option.

J.

Re: [InHouse] createPDF installation problem

I can't get around the issue either on shared hosting plans as they've categorically said "no" (three different hosting companies). Did a workaround with a print this page, but the createPDF would have been much better. Shame.

Re: [InHouse] createPDF installation problem

By Chris - September 15, 2010

Hi InHouse,

We're looking into some work-arounds for this, including having a "proxying" option so that you can have one web server call another one which does the PDF generation. We're also thinking that we might be able to build a small Perl script to side-step the issue.

If you can email me your FTP information at chris@interactivetools.com, I'll see if I can build that Perl script and get things working for you. It just might work! :)
All the best,
Chris

Re: [chris] createPDF installation problem

Great Chris. I'll send you over the details for a site where I'd like to implement this.

Cheers,
J.

Re: [chris] createPDF installation problem

By Codee - September 24, 2010

Having a similar issue: all tests pass EXCEPT ONE:

Failed! Test running PDF conversion program on server

Testing pdf binary with command: /usr/home2/letitfly/public_html/lifgAdmin/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-i386 -V
Result: 0 bytes returned
Error: No output returned from command! (Exit code: 2)

What do I do? thanks!