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' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -