Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

php - exec Exit Code Meaning for 11

I'm using the following code on a linux web server

$error = exec('phantomjs table1.js', $op, $code);
echo $code; // prints 11 on screen

table1.js

var page = require('webpage').create();
var url = 'table1.php';
page.open(url, function (status) {
    page.render('ss/table1.png');
    phantom.exit();
});

table1.php

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...