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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -