All binaries fail testing with PDFCreator 1.09 and CMSB 3.15

By daniel - October 12, 2018

Hi equinox,

From the test output above, it looks like two of the binaries are at least partially working (they are generating a PDF of a secure page, but not an insecure one): 

  • wkhtmltopdf-0.12.5-1.centos6.x86_64
  • wkhtmltopdf-0.12.4_linux-generic-amd64

To test these out, update the $GLOBALS['CREATEPDF_BINARY_FILE'] value at the top of the createPDF.php file with either of the binary names, for example:

$GLOBALS['CREATEPDF_BINARY_FILE'] = 'wkhtmltopdf-0.12.5-1.centos6.x86_64';

After changing that, try visiting the Test Server Requirements link again to see if the tests pass. If one of them works then you can go into /cmsb/plugins/createPDF/wkhtmltopdf/ and remove all the other binary files (files starting with "wkhtmltopdf-")

Let me know how that works out or if you need help with anything else.

Thanks,

Daniel
Technical Lead
interactivetools.com

By Dave - October 12, 2018

Hi equinox,

Your host may not have the default linux libraries required to run the wkhtmltopdf binary that createPDF uses.  You could try asking their support.  Sometimes you need to ask a few times to get past first level support.  Try an email such as the following:

Hi support,. 

I'm trying to use a linux PDF creation library https://wkhtmltopdf.org/ but I'm getting this error: 

home/b1q0r2z57to2/public_html/oeAdmin273/plugins/createpdf_1-09/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_i386: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory 

It seems the libjpeg libraries aren't installed on the server.  Could you ask the server admins to install/update those?  I believe this can be done with the linux command: yum install libjpeg

Can you let me know if that's possible? We need to be able to create PDFs for the website.

Thanks in advance!

Also, which godaddy account type is it?

Hope that helps!  Let me know what they say.

Dave Edis - Senior Developer
interactivetools.com

By Codee - October 12, 2018

Hi Daniel,

I noticed that...BUUUUTT...then I noticed, repeatedly, that the testing all binaries fails. Thanks.

Hi Dave,

I will send the suggested email to GoDaddy hosting. It's a new, deluxe (but shared) hosting account with a standard SSL Cert. And I "get it" about sometimes needing to go through multi-layers of support in order to get what my clients need.

Thank you kindly!

By KCMedia - October 13, 2018

Hi Dave

I have run into this with a few hosts now and it seems that every single web hosting company that is using cPanel has turned this feature off and has been told to by cPanel due to some security risk with binarys being run on servers now.

I have spoken with 3 hosting companies in Australia and they all say the same thing and refuse to turn it back on and said if you want this then you need to buy a VPS to get the feature control and turn it off at your own risk.

This is only going to get worse as more and more hosting companies turn this off.

Might be worth looking into another solution for the plugin as i have 5 websites that now can't do this.

Thanks



Craig

KC Media Solutions

www.kcmedia.biz

By Dave - October 15, 2018

Hi Craig, 

Some hosts turn off the ability to run linux binaries.  It's not the case above, the server just doesn't have some libraries installed that are required.

But regarding hosting, I wouldn't host on less than a VPS.  The problem with shared hosting is that you can get thousands of other websites hosted on the same server as yours and during busy times it can slow down, etc.  I'm also skeptical of cheap cheap hosting.  How much are you paying now and what kind of hosting plan is it?  

Dave Edis - Senior Developer
interactivetools.com

By KCMedia - October 15, 2018

Hi Dave

they are not cheap hosting they are around $250 a year, the issue comes from cPanel turing this feature of by default and have told all hosting companies to do so.

I spun up a VPS server the other day and do an install of cPanel and yep there it was turned off by default.

here is an excerpt from the ticket from a large hosting company here in Australia

We have checked and confirmed with our System Administrators that the PHP Functions (show_source, system, shell_exec, passthru, exec, popen, proc_open, allow_url_fopen, pcntl_exe) are all disabled on all Shared Hosting servers. This change was made due to potential vulnerabilities being exploitable using those functions. For the same reason, the decision was not made public and was on the advice from WHM/cPanel.

Thanks



Craig

KC Media Solutions

www.kcmedia.biz

By Dave - October 15, 2018

Hey Craig, 

$250 a year or a month?  If it's a year that's barely over $20 a month.  If it's working and you can get away with it it's fine but in general, I wouldn't trust that for any client sites.  You're going to get something a lot more consistent and reliable that can host many client websites (not to mention better support) in the $50 to $100 range.  I think we pay $150 for a dedicated server through OVH.  

Glad you upgraded a VPS, that'll be a lot better for everything you're doing.

Dave Edis - Senior Developer
interactivetools.com