7 posts by 2 authors in: Forums > CMS Builder
Last Post: November 16   (RSS)

By gkornbluth - November 13 - edited: November 13

Hi All,

I guess this is not my week...

Since yesterday, I've been having trouble with createPDF plugin on all sites on a particular Bluehost server.

Most return the error:

Exit with code 1 due to network error: ContentNotFoundError
Error executing wkhtmltopdf! (Exit code: 1)<br/>

If I try to use a proxy server where I know that createPDF works, I get the same error.

On another site on the same server (my cookbook site) I get this error:

sh: /home2/ngpymrmy/public_html/thecmsbcookbook/cmsAdmin/plugins/createPDF1.09/wkhtmltopdf/wkhtmltopdf-0.12.5-1.centos6.x86_64: Permission denied
Error executing wkhtmltopdf! (Exit code: 126)<br/>

All server requirement tests pass on the originating server with either proxy disabled or enabled.

Any thoughts?

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Hi Jerry,

The ContentNotFoundError issue looks to be a bit nebulous and may be caused by issues with some assets being loaded on the page, or issues with the network request asking for the page (e.g. redirects). A few things you can try to narrow it down:

  • Try to render a PDF of "known good" HTML on the server at issue
  • Try to render a PDF using a document not on the server at issue

Both of these cases can be tested using the Example Code link that comes with the plugin. If you can render PDFs of other documents on the server then you'll have to figure out what part of the original PDF is causing an error. If you can render PDFs of documents on other servers but none on your own, this points to a server configuration issue - check for things like redirects or htaccess rules that may be interfering with the request.

For the other error - Permission denied - unless you feel comfortable making file permission adjustments through the command line I would recommend raising this one with your hosting support. If this was previously working then they may know if there was any recent server changes that could have had an impact, and/or otherwise be able to help correct the permission issue.

Hope the above is helpful - let me know if you have any more questions!

Thanks,
Daniel

Daniel
PHP Programmer
interactivetools.com

Daniel,

Thanks for the insights.

I'll look at it in the morning.

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By gkornbluth - November 15 - edited: November 15

Hi Daniel,

I've made a little progress so far, but I really don't understand what's going on with permissions.

After a lot of trial and error it seems that after I removed a link to a missing .css file from the head of the file on the site that threw the "Exit with code 1 due to network error: ContentNotFoundError Error executing wkhtmltopdf! (Exit code: 1)<br/>" error, the file generates PDFs as it should.

Seems Pretty Picky....

As far as changing permissions on the command line, I don't think I can do this on a shared server at Bluehost.

Anything more specific that I can tell them that won't trigger their classic "But it's not a Wordpress site and we can't help with custom coded sites" response?

Thanks,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

Hey Jerry,

Glad you figured out one of the issues - that is a fairly nitpicky reason to throw an error, but good to know for the future!

Anything more specific that I can tell them that won't trigger their classic "But it's not a Wordpress site and we can't help with custom coded sites" response?

This is a bit trickier, as I don't have any direct experience with Bluehost or what their support considers "in scope." The specific thing you want them to help with is updating the permissions on a file so that it can be executed by a PHP script using the "exec()" function. This line of the error shows specifically where the file is:

sh: /home2/ngpymrmy/public_html/thecmsbcookbook/cmsAdmin/plugins/createPDF1.09/wkhtmltopdf/wkhtmltopdf-0.12.5-1.centos6.x86_64: Permission denied

If this was previously working (and you haven't made any changes to the plugin) then I'd also suggest bringing that up, as it puts the onus on the host to figure out why something that was working on their system no longer is.

If that doesn't lead anywhere, a local permission issue shouldn't stop you from using a different working host as a proxy - if you have one available.

Good luck!

Daniel
PHP Programmer
interactivetools.com

By gkornbluth - November 15 - edited: November 15

Thanks Daniel,

I'm assuming that this is a different thing then standard read write execute file permission like 0755 or 0644.

Seems that almost any issue is 'out of scope' for them lately. I'll give them a try, but also try the proxy route.

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!

Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php