alright i've written script job uses casperjs grab pdf , download it, continue execution of php script. call script using exec().
this works fine on windows 10 machine using xampp. when port work laptop (a macbook pro running latest osx) exec() not work casperjs. can call phantomjs --version , casperjs --version terminal no problem, both installed using node.js global flag. i've confirmed in usr/local/bin.
when run exec("phantomjs --version", $output); works fine , returns phantomjs version.
when run exec("casperjs --version", $output); returns empty array in output, rather version number.
i'm unsure why happening, , i've been googling , googling , no solutions. found several topics here had same issues, , implemented solutions , still won't work. code work long , has lot of information can't share, here test script created see if around issue.
i want specify using xampp mac run this, didn't want take time setup vagrant box, , setup vpn stuff (that script has run through) run script.
<?php putenv("phantomjs_executable=/usr/local/bin/phantomjs"); putenv("dyld_library_path"); putenv("path=/usr/local/bin"); exec("casperjs --version", $output); print_r($output); ?>
i hate asking help, script going take 2 more days run, , because have connected vpn, primary computer use gaming, personal projects, etc tied , i'd love move work laptop can enjoy personal computer weekend.
Comments
Post a Comment