Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder: Plugins & Add-ons:
createPDF installation problem

 

 


degreesnorth
User

Aug 12, 2010, 8:17 PM

Post #1 of 14 (5441 views)
Shortcut
createPDF installation problem Can't Post

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


Jason
Staff / Moderator


Aug 16, 2010, 8:41 AM

Post #2 of 14 (5318 views)
Shortcut
Re: [degreesnorth] createPDF installation problem [In reply to] Can't Post

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 - Programmer 
interactivetools.com

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


degreesnorth
User

Aug 23, 2010, 6:04 PM

Post #3 of 14 (5214 views)
Shortcut
Re: [Jason] createPDF installation problem [In reply to] Can't Post

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


degreesnorth
User

Aug 23, 2010, 10:45 PM

Post #4 of 14 (5195 views)
Shortcut
Re: [degreesnorth] createPDF installation problem [In reply to] Can't Post

Hi
I got a message that you replied, but when I click on the link there is no message - it says the message does not exist.
Could you please re-post.

Thanks


Jason
Staff / Moderator


Aug 24, 2010, 8:28 AM

Post #5 of 14 (5168 views)
Shortcut
Re: [degreesnorth] createPDF installation problem [In reply to] Can't Post

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 - Programmer 
interactivetools.com

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


InHouse
User

Sep 15, 2010, 11:29 AM

Post #6 of 14 (4550 views)
Shortcut
Re: [degreesnorth] createPDF installation problem [In reply to] Can't Post

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.


degreesnorth
User

Sep 15, 2010, 2:35 PM

Post #7 of 14 (4533 views)
Shortcut
Re: [InHouse] createPDF installation problem [In reply to] Can't Post

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.


Chris
Staff / Moderator


Sep 15, 2010, 2:35 PM

Post #8 of 14 (4533 views)
Shortcut
Re: [InHouse] createPDF installation problem [In reply to] Can't Post

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! :)
Chris


InHouse
User

Sep 16, 2010, 8:15 AM

Post #9 of 14 (4494 views)
Shortcut
Re: [chris] createPDF installation problem [In reply to] Can't Post

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

Cheers,
J.


equinox69
User

Sep 24, 2010, 12:43 PM

Post #10 of 14 (4090 views)
Shortcut
Re: [chris] createPDF installation problem [In reply to] Can't Post

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!


equinox69
User

Sep 25, 2010, 12:22 AM

Post #11 of 14 (4037 views)
Shortcut
Re: [equinox69] createPDF installation problem [In reply to] Can't Post

So, while thinking about this I thought I'd modify the permissions to the end file to 755, then I modified the /examples directory permissions to 777 and the current only fail message is:

Quote
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)


and the output window displays:

Quote
/usr/home2/letitfly/public_html/lifgAdmin/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-i386: 1: Syntax error: "(" unexpected


is this a syntax error in the plugin?


Chris
Staff / Moderator


Sep 27, 2010, 12:48 PM

Post #12 of 14 (3761 views)
Shortcut
Re: [equinox69] createPDF installation problem [In reply to] Can't Post

Hi equinox69,

I'm guessing it's a server configuration issue. Can you please fill out your FTP details with a Second Level Support Request and I can take a look? Please include my name and a link to this forum thread.
Chris


equinox69
User

Sep 27, 2010, 2:28 PM

Post #13 of 14 (3755 views)
Shortcut
Re: [chris] createPDF installation problem [In reply to] Can't Post

Thanks in advance Chris. Just submitted support ticket, Ticket ID: HMH-117352


InHouse
User

Oct 12, 2010, 2:32 PM

Post #14 of 14 (2861 views)
Shortcut
Re: [chris] createPDF installation problem [In reply to] Can't Post

Just by way of an update. One of my hosts has quietly installed the fontConfig libs needed for this to work. Dave (II's fearless leader) was able to install it safely on that one server.
Another main server politely declined again to install it on a shared box, suggesting that I move to their "cloud" service or other higher-level services.

The option to run this by proxy, as suggested by Dave, looks promising though.

J.