Z
Z
ZaurK2017-09-02 12:27:03
C++ / C#
ZaurK, 2017-09-02 12:27:03

How to fix error when starting casperjs?

Welcome all!
Trying to run casperjs from php code:

function parser() {
    try {
        echo shell_exec('C:/casperjs/bin/casperjs --version 2>&1');
        flush();
    } catch (Exception $exc) {
        echo('error!');
        echo $exc->getTraceAsString();
    }
}

putenv("PHANTOMJS_EXECUTABLE=/usr/local/bin/phantomjs");
putenv("DYLD_LIBRARY_PATH");

parser();

From the terminal both casperjs and phantomjs are launched. From the php code, I can similarly run phantomjs --version, but for casperjs it gives an error:
08:38:54 Fatal: �� 㤠���� ���� 㪠����� 䠩�; did you install phantomjs?
For several days I can not understand, googling did not give anything, tell me where to dig? windows8 system, openserver server.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Farwisdomer, 2019-05-13
@Farwisdomer

https://stackoverflow.com/questions/3463976/c-file...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question