K
kamarudin samsudin
Hi all,
I try to invoke python serial script via my browser using PHP (exec
function). For the serial communication, i used pySerial module. It
fine when it run it as root but when i try to run it from browser, i
got this error in my httpd/error_log
File "weather1.py", line 9, in ?
ser=serial.Serial('/dev/ttyS0',9600,timeout=1)
File "/usr/lib/python2.3/site-packages/serial/serialutil.py", line
153, in __init__
self.open()
File "/usr/lib/python2.3/site-packages/serial/serialposix.py", line
137, in open
raise SerialException("Could not open port: %s" % msg)
serial.serialutil.SerialException: Could not open port: [Errno 13]
Permission denied: '/dev/ttyS0'
i tried chmod go+wr /dev/ttyS0 but i still got the error.
BTW, i used apache 2.0.52, PHP 4.3.10 and Fedora Core 3
Thanks in advance.
I try to invoke python serial script via my browser using PHP (exec
function). For the serial communication, i used pySerial module. It
fine when it run it as root but when i try to run it from browser, i
got this error in my httpd/error_log
File "weather1.py", line 9, in ?
ser=serial.Serial('/dev/ttyS0',9600,timeout=1)
File "/usr/lib/python2.3/site-packages/serial/serialutil.py", line
153, in __init__
self.open()
File "/usr/lib/python2.3/site-packages/serial/serialposix.py", line
137, in open
raise SerialException("Could not open port: %s" % msg)
serial.serialutil.SerialException: Could not open port: [Errno 13]
Permission denied: '/dev/ttyS0'
i tried chmod go+wr /dev/ttyS0 but i still got the error.
BTW, i used apache 2.0.52, PHP 4.3.10 and Fedora Core 3
Thanks in advance.