exec() 139 exit code! Help!

2,031 views
Skip to first unread message

nasy

unread,
Dec 2, 2012, 4:02:35 PM12/2/12
to phan...@googlegroups.com

Hi, I am getting crazy trying to execute 

$output = array();
$return_var=0;
$command = "phantom/phantomjs phantom/rasterize.js http://www.acb.com phantom/2.png";
exec($command,$output,$return_var);

in the server If I use the command line it works fine, but when I execute in the php class I get a 139 (segmentation fault)

WHat can I do??

mlad...@gmail.com

unread,
Aug 31, 2013, 7:34:01 AM8/31/13
to phan...@googlegroups.com
Hi,

Error code 139 might not be what you think it is (segfault)... Consider this list of errno constans: http://publib.boulder.ibm.com/infocenter/zos/v1r12/index.jsp?topic=%2Fcom.ibm.zos.r12.bpxa800%2Ferrno.htm
There, you'll find that 139 is actually: EPERM - The operation is not permitted.
This usually means that you didn't set the +x (executable) flag on your executable file, which you can do using: chmod +x phantomjs

Cheers,
b.
Reply all
Reply to author
Forward
0 new messages