D
D
dmitred2016-12-26 17:38:06
PHP
dmitred, 2016-12-26 17:38:06

How to install phantomjs on Centos 7 and call in php?

Good time of the day!
Tell me what I can’t figure out further for the whole day I didn’t really find anything on Google (
I installed phantomjs as I found in this discussion How to install PhantomJS on CentOS 7? I installed the VPS server through the Centos 7 console. then I
found the folder where it was installed / usr /lib/node_modules/phantomjs
now I call in php

$output = shell_exec('/usr/lib/node_modules/phantomjs -v');
echo "<pre>$output</pre>";

But an empty page, on the Internet, found that a version should be issued.
What am I missing and what am I doing wrong? Maybe some directory from phantomjs needs to be specified in the request?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton fon Faust, 2016-12-28
@bubandos

And if you execute from the console: /usr/lib/node_modules/phantomjs -v
will anything return?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question