1

SlimerJs - Few steps Installed Done and This (xvfb-run bin/slimerjs overview.js) linux command working in terminal. But this command execute php5 via is not working. I have tried shell_exec, exec and passthru. So, please help me. Below my php code enclosed.

slimer.php
---------------
putenv("SLIMERJS_EXECUTABLE=/opt/slimerjs");
putenv("SLIMERJSLAUNCHER=/usr/bin/xulrunner");
putenv("DISPLAY=:99.0");

$varExec = 'xvfb-run bin/slimerjs overview.js';
shell_exec($varExec);


overview.js
------------
var page = require('webpage').create();
page.open('https://www.google.co.in', function (status) {
    page.viewportSize = { width:1024, height:768 };
    page.render('screenshot_1.png');
    var defaultValue =0;
    setTimeout(function() {
        page.render('screenshot1.jpg', { format: 'jpg', quality: 90 });
            page.close();
            slimer.exit()
          // Do something after 5 seconds
    }, 1000);
});

Above php code run then don't show error.
senraj
  • 49
  • 3

0 Answers0