createPDF fails on new server

By pgplast - December 1, 2022

I moved a site that was successfully using createPDF to a new server. (Both the old and new server run CentOS 7).

Originally I get errors secondary to shell_exec() being inactive. However, since that was remedied, I get the following errors when  running the server requirements trests:

  • PDF Conversion ProgramThis plugin is using: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.6-1.centos8.x86_64
    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
  • Passed! Run external program on serverTesting shell_exec() with command: pwd
    Result: /home/pgplast/public_html/cmsCSoft
  • Failed! Test running PDF conversion program on serverTesting pdf binary with command: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.6-1.centos8.x86_64 -V
    Result: 0 bytes returned
    Output:
    Error: No output returned from command! (Exit code: 127)
  • Passed! Create and remove temp file on serverCreating temp file: /home/pgplast/public_html/cmsCSoft/createPDF_28c91c22183d2be7b89e020005d1f1d4.tmp
    Removing temp file: /home/pgplast/public_html/cmsCSoft/createPDF_28c91c22183d2be7b89e020005d1f1d4.tmp
  • Passed! Test downloading content from remote URLDownloading content from url with: getPage('http://www.google.com/');
    Result: HTTP status code 302 (view source, html)
  • Passed! Test downloading content from this serverDownloading content from url with: getPage('http://nypqcme.org/');
    Resolve hostname 'nypqcme.org' to IP address: 67.227.248.142
    Result: HTTP status code 200 (view source, html)
    Check that this is returning your website's homepage!
  • Failed! Test converting a web page to a PDFCreated PDF with: HTML from: https://www.google.com/
    Result: 0 byte PDF returned
    Error: Conversion program returned errors:
    /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.6-1.centos8.x86_64: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)

When I run "Test all binaries" they all fail.

  • Failed! wkhtmltopdf-0.12.6-1.centos8.x86_64
  • Program version reported: (Error: Exit code 127)
  • Create PDF of non-secure page http://www.example.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.6-1.centos8.x86_64: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Create PDF of secure page https://www.google.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.6-1.centos8.x86_64: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Failed! wkhtmltopdf-0.12.6-1.centos8.aarch64
  • Program version reported: (Error: Exit code 126)
  • Create PDF of non-secure page http://www.example.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.6-1.centos8.aarch64: cannot execute binary file Error executing wkhtmltopdf! (Exit code: 126)
  • Create PDF of secure page https://www.google.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.6-1.centos8.aarch64: cannot execute binary file Error executing wkhtmltopdf! (Exit code: 126)
  • Failed! wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_i386
  • Program version reported: (Error: Exit code 126)
  • Create PDF of non-secure page http://www.example.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Create PDF of secure page https://www.google.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Failed! wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_amd64
  • Program version reported: (Error: Exit code 127)
  • Create PDF of non-secure page http://www.example.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Create PDF of secure page https://www.google.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu18.04_bionic_amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Failed! wkhtmltopdf-0.12.5-1.ubuntu16.04_xenial_i386
  • Program version reported: (Error: Exit code 126)
  • Create PDF of non-secure page http://www.example.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu16.04_xenial_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Create PDF of secure page https://www.google.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu16.04_xenial_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Failed! wkhtmltopdf-0.12.5-1.ubuntu16.04_xenial_amd64
  • Program version reported: (Error: Exit code 127)
  • Create PDF of non-secure page http://www.example.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu16.04_xenial_amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Create PDF of secure page https://www.google.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu16.04_xenial_amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Failed! wkhtmltopdf-0.12.5-1.ubuntu14.04_trusty_i386
  • Program version reported: (Error: Exit code 126)
  • Create PDF of non-secure page http://www.example.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu14.04_trusty_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Create PDF of secure page https://www.google.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu14.04_trusty_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Failed! wkhtmltopdf-0.12.5-1.ubuntu14.04_trusty_amd64
  • Program version reported: (Error: Exit code 127)
  • Create PDF of non-secure page http://www.example.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu14.04_trusty_amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Create PDF of secure page https://www.google.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.ubuntu14.04_trusty_amd64: error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Failed! wkhtmltopdf-0.12.5-1.debian9_stretch_i386
  • Program version reported: (Error: Exit code 126)
  • Create PDF of non-secure page http://www.example.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian9_stretch_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Create PDF of secure page https://www.google.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian9_stretch_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Failed! wkhtmltopdf-0.12.5-1.debian9_stretch_amd64
  • Program version reported: (Error: Exit code 127)
  • Create PDF of non-secure page http://www.example.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian9_stretch_amd64: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Create PDF of secure page https://www.google.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian9_stretch_amd64: error while loading shared libraries: libpng16.so.16: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Failed! wkhtmltopdf-0.12.5-1.debian8_jessie_i386
  • Program version reported: (Error: Exit code 126)
  • Create PDF of non-secure page http://www.example.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian8_jessie_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Create PDF of secure page https://www.google.com/ - Errors: sh: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian8_jessie_i386: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory Error executing wkhtmltopdf! (Exit code: 126)
  • Failed! wkhtmltopdf-0.12.5-1.debian8_jessie_amd64
  • Program version reported: (Error: Exit code 127)
  • Create PDF of non-secure page http://www.example.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian8_jessie_amd64: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)
  • Create PDF of secure page https://www.google.com/ - Errors: /home/pgplast/public_html/cmsCSoft/plugins/createPDF/wkhtmltopdf/wkhtmltopdf-0.12.5-1.debian8_jessie_amd64: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory Error executing wkhtmltopdf! (Exit code: 127)

I have gone to https://wkhtmltopdf.org/downloads.html to download binaries for CentOS 7, but specifying them in createPDF.php also fails.

wkhtmltox-0.12.6-1.centos7.aarch64.rpm

wkhtmltox-0.12.6-1.centos7.x86_64.rpm

Any ideas would be greatly appreciated as the site users were employing the plugin on our old install.

Thanks

By Dave - December 7, 2022

No worries, glad to hear it's working!

Please feel free to let us know if you run into any other issues.

Thanks!

Dave Edis - Senior Developer
interactivetools.com