Z
Z
ZaurK2017-08-30 11:04:42
Software testing
ZaurK, 2017-08-30 11:04:42

Why doesn't casperjs run from php code?

Hello! I had a working script, but after a system crash and a factory reset, casper stopped running from the php code.

<?php
function parser($myurli, $file_path) {
        try {
            echo(shell_exec('casperjs auth.js '.$myurli.' '.$file_path.''));		
            flush();
        } catch (Exception $exc) {
            echo('Ошибка!');
            echo $exc->getTraceAsString();
        }
    }
putenv("PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs");
putenv("DYLD_LIBRARY_PATH");

?>

This script was working, two variables were passed to the auth.js file. I checked both casper and phantom work, I can run the auth.js file through the terminal, but the script does not start from php. Please let me know if anyone knows what could be the problem? Windows8 system, using open server.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question