Slimerjs with exec linux centos 6

741 views Asked by At

I just installed Slimerjs and no results on the web.

the slimerjs is found and commands like -help etc output like they should: exec('/usr/bin/slimerjs -help'.' 2>&1',$out,$ret);

but this line does not work

       exec('/usr/bin/slimerjs /var/www/html/capture.js'.' 2>&1',$out,$ret); var_dump($ret, $out); 

outputs only int(1); and nothing more. no errors in logs, it does not work. I can write everything I like if the bath is correct the output is always int(1).

Thank you

1

There are 1 answers

0
SwCharlie On BEST ANSWER

Had same issue now, just a minute ago. But I am using a combination of Casperjs with Slimerjs engine (Casperjs is a great tool for working with your slimerjs and phantomjs scripts, in a friendlier enviroment programming).

The working php script:

<?php 

putenv("PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs");
putenv("CASPERJS_EXECUTABLE=/usr/local/bin/casperjs");
putenv("SLIMERJS_EXECUTABLE=/usr/local/bin/slimerjs");
putenv("DYLD_LIBRARY_PATH");

echo passthru('/usr/bin/xvfb-run /usr/local/bin/casperjs --ssl-protocol=any --proxy-type=auto --engine=slimerjs casperjsscript.js 2>&1'); 

?>

You could perhaps check to include some of the paths, as indicated seen in my script and make a few changes, or just install Casperjs :)