I'm using the following code on a linux web server
$error = exec('phantomjs table1.js', $op, $code);
echo $code; // prints 11 on screen
var page = require('webpage').create();
var url = 'table1.php';
page.open(url, function (status) {
page.render('ss/table1.png');
phantom.exit();
});
echo '<h1>This should be converted to an image</h1>';
I went through this link but that code isn't listed there. Any idea what this exit code stands for?
Code 11 is a "segmentation fault": A segmentation fault (also segfault) is caused by a program when it tries to allocate data in a piece of memory that is not assigned to the program. It indicates a program error and usually (if not always) crashes the program. In your case, the segfault probably is caused by phantomjs, which indicates perhaps an old or beta version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With