Problem: Getting Warning: exec(): Unable to fork with hello.js
Question: How can I make it work?
Description:
I'm trying to make phantomJs work on a Windows server. I have the following files on the public_html folder:
- phantomjs.exe
- index.php
- hello.js
Where index.php is simply:
<?php $response = exec('phantomjs.exe hello.js');
And hello.js is:
console.log("Hello world!");
phantom.exit();
When I run index.php I get the following error:
Warning: exec(): Unable to fork [phantomjs.exe hello.js] in D:\sites\creditflow.com\public_html\index.php on line 1
The code above is currently hosted here.
Question: how can I make it work?