Unable to set the Create PDF plugin

4 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 20, 2019   (RSS)

By andreasml - May 14, 2019

Hi

I am trying to setup the Create PDF. First I click the Test Server Requirements and I get back the following: 

PDF Conversion Program
This plugin is using: /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_amd64
Plugins settings: CREATEPDF_BINARY_FILE: auto-detected
If all the test below don't pass you can try: download updated binaries and testing all binaries
Warning: shell_exec() has been disabled for security reasons in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF_pluginsMenu.php on line 176
Failed! Run external program on server
Testing shell_exec() with command: pwd
Result: 
Error: No output returned from command!
Warning: exec() has been disabled for security reasons in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF_pluginsMenu.php on line 107 Warning: join(): Invalid arguments passed in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF_pluginsMenu.php on line 108
Failed! Test running PDF conversion program on server
Testing pdf binary with command: /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_amd64 -V
Result: 0 bytes returned
Output: 
Error: No output returned from command! (Exit code: -1)
Passed! Create and remove temp file on server
Creating temp file: /var/www/vhosts/vascularregistry.gr/httpdocs/registry/createPDF_856fc8c9adb9c204e8bf45225ee9d504.tmp
Removing temp file: /var/www/vhosts/vascularregistry.gr/httpdocs/registry/createPDF_856fc8c9adb9c204e8bf45225ee9d504.tmp
Passed! Test downloading content from remote URL
Downloading content from url with: getPage('http://www.google.com/');
Result: HTTP status code 302 (view source, html)
Passed! Test downloading content from this server
Downloading content from url with: getPage('http://vascularregistry.gr/');
Resolve hostname 'vascularregistry.gr' to IP address: 185.138.42.30
Result: HTTP status code 301 (view source, html)
Check that this is returning your website's homepage!
Warning: shell_exec() has been disabled for security reasons in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF.php on line 169 Notice: Undefined variable: outputArray in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF.php on line 170 Notice: Undefined variable: returnCode in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF.php on line 170 Warning: exec() has been disabled for security reasons in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF.php on line 170 Notice: Undefined variable: outputArray in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF.php on line 171 Notice: Undefined variable: returnCode in /var/www/vhosts/vascularregistry.gr/httpdocs/registry/plugins/createPDF/createPDF.php on line 175
Failed! Test converting a web page to a PDF
Created PDF with: HTML from: https://www.google.com/
Result: 0 byte PDF returned
Error: Conversion program returned errors:
Temp file didn't get created, check for: 1) wkhtmltopdf errors and 2) make sure server is able to connect to itself internally! 

Then, I try the testing all binaries, but nothing also.

Any suggestions how to proceed?

Regards,

Andreas Lazaris

By Dave - May 14, 2019

Hi Andreas, 

The issue is that the web host has disabled the PHP commands exec() and shell_exec().  The createPDF plugin uses a linux binary app called wkhtmltopdf and it needs to run that app as a program.

I'd suggest emailing your host and asking them if they can allow those PHP functions.  And if they respond that they can't or won't, you could ask if they have any other hosting plans available that support it.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com

By andreasml - May 17, 2019

Hi Dave

Indeed these functions are disabled. They told me to change the hosting program to another one which costs about 5 times more the one I have got now. In fact the new program will cost around 20 Euros / months. Do you think that this a reasonable price for this type of service or do I have to try another hosting company? I wonder whether there is a way to activate these functions myself.

Regards

Andreas Lazaris