Python script won't exec from php when specific library is used -


im trying execute python script , set parameter server in ros. when run other simple python script example prints "hello", value in php. when run code:

 #!/usr/bin/env python  import roslib  import rospy  import sys  import re  import string   = rospy.get_param("param")  print 

i empty echo. code works fine in terminal!

all i'm doing in php is:

 $output = exec("python path/script.py")  echo $output; 

i tried shell_exec, tried python in command, , without. tried /usr/bin/python still won't work specific code, works simple print!

it turns out apache's user doesnt have required environment variables. have add environment variables paths need in apache's.. can set them out here


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -