I am calling python script from php using exec function
$output = "";
$result = "";
exec("python /home/user/work/testwithphantomjs.py",$output,$result);
var_dump($output);
var_dump($result);
The script does not run when I import selenium webdriver in the python script but if I do not import selenium webdriver it works.
from selenium import webdriver
print "inside start 1"
Lajos Arpad
80.8k42 gold badges124 silver badges235 bronze badges
-
What does "the script does not run" mean? Errors or ?JeffC– JeffC2017年07月21日 13:26:54 +00:00Commented Jul 21, 2017 at 13:26
-
Script does not run through php , but runs from terminal only.kaustubh k– kaustubh k2017年07月21日 14:16:16 +00:00Commented Jul 21, 2017 at 14:16
-
I hope this will help for sure stackoverflow.com/a/45370665/6008000 ThanksDanish Absar– Danish Absar2017年07月28日 10:21:55 +00:00Commented Jul 28, 2017 at 10:21
default