{"id":3455,"date":"2014-03-25T11:26:04","date_gmt":"2014-03-25T11:26:04","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/25\/wkhtmltoimage-permission-issue-collection-of-common-programming-errors\/"},"modified":"2014-03-25T11:26:04","modified_gmt":"2014-03-25T11:26:04","slug":"wkhtmltoimage-permission-issue-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/25\/wkhtmltoimage-permission-issue-collection-of-common-programming-errors\/","title":{"rendered":"wkhtmltoimage permission issue-Collection of common programming errors"},"content":{"rendered":"<p>Problem: running wkhtmltoimage from a browser (localhost\/run.php) fails (doesn&#8217;t finish, generates a crash report) when pulling some sites (http:\/\/tmz.com is one). It seems to be related to plugins (DirectorShockwave for instance). Most sites work just fine from the browser (if not &#8211;disable-javascript fixes them)<\/p>\n<p>Environment: OSX 10.8, wkhtmltoimage 0.10.0 rc2, Chrome &amp; Firefox<\/p>\n<p>I&#8217;ve tried various combinations of settings (wkhtmltoimage &#8211;disable-plugins &#8211;load-error-handling ignore &#8211;disable-javascript http:\/\/www.tmz.com test4.png) and still get the same result.<\/p>\n<p>However, if I run the same php script from terminal, it will work &#8211; the process finishes and the image is created and saved per the php script.<\/p>\n<p>When I output posix_getuid() in each scenario, obviously there are different users: _www from the browser, my admin account from Terminal.<\/p>\n<p>The crash report has this line &#8220;Exception Type: EXC_BAD_ACCESS (SIGBUS)&#8221; when running from the browser, so I assume it&#8217;s a permission issue. There is no crash report when run from Terminal.<\/p>\n<p>What is the best approach to address this? Running the exec() statement as a different user? Letting _www initiate Flash? Something else?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Problem: running wkhtmltoimage from a browser (localhost\/run.php) fails (doesn&#8217;t finish, generates a crash report) when pulling some sites (http:\/\/tmz.com is one). It seems to be related to plugins (DirectorShockwave for instance). Most sites work just fine from the browser (if not &#8211;disable-javascript fixes them) Environment: OSX 10.8, wkhtmltoimage 0.10.0 rc2, Chrome &amp; Firefox I&#8217;ve tried [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3455","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3455"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3455\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}