问题描述:

phantomjs is installed and if I run in my PHP script

exec("path/to/phantomjs -v");

it returns the version, so phantomjs itself is working properly, however, if I try a very simple script such as

console.log("hello world");

phantom.exit();

It returns 11 (segmentation fault). Both the script and phantomjs have permission to execute. The script is found and executable by the command, otherwise it would return either 127 (not found) or 126 (not executable).

PS: It works fine in my localhost, but not in my web hosting service.

相关阅读:
Top