I am trying to pass CasperJS results to PHP but it's not working (the output is empty).
Here is my code:
<?php
exec("casperjs test.js", $array);
print_r($array);
?>
The exec works for any other command ("echo hello"), but not casperjs. $array is empty and execution time is instantaneous...
The PHP script is of course in the same directory as test.js
I'm guessing it's a path issue but nothing works... I've tried "/usr/local/bin/casperjs test.js", it returns
Fatal: [Errno 2] No such file or directory; did you install phantomjs?
Any ideas?