0

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
asked Jul 21, 2017 at 11:52
3
  • What does "the script does not run" mean? Errors or ? Commented Jul 21, 2017 at 13:26
  • Script does not run through php , but runs from terminal only. Commented Jul 21, 2017 at 14:16
  • I hope this will help for sure stackoverflow.com/a/45370665/6008000 Thanks Commented Jul 28, 2017 at 10:21

0

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.