Here is a code snippet from my PHP code. I am trying to execute casperJS script by passing one argument to it. The output of CasperJS is expected in the variable $array_here. How to exactly debug whether my casperJS is able to execute it or not. It's Basically a Webhook[.PHP code] for a messenger Bot which on getting called runs a script -->scrapes data--->replies back.
I am new to CasperJS/PhantomJS framework and thus not able to debug/find out what exactly is happening in my shell_exec command.
If some one could put some light on how to find out whether CasperJS Script is able to run or not.
Initially I have tested the Script on my Windows CMD which runs totally fine and .PHP code on server which is able to interact with FB Messenger.
So Now I have put put all the codes in my CPanel,Uploaded the CasperJS,PhantomJS packages in my home directory and trying to rum them at one go. Like if I refresh this page : https://......../test.php
My directory Structure of Web Root(public) Directory of fileManager of CPanel :
Where I have Unzipped CasperJS and PhantomJS ?
What is the PHP code I am using to call Scripts:
The commented echo works fine but the second one doesn't output anything.