Hi there
I�ve got a problem porting from windows to Linux, when I wanna read and write
to the serial port. This works like a charm in windows:
if (!$fp = fopen("COM1", 'w+b')) {
echo "\nError! Could not open COMport - Got a terminal open?\n";
exit;
}
The program continues, but breaks in linux:
if (!$fp = fopen("/dev/ttyS0", 'w+b')) {
echo "\nError! Could not open COMport - Got a terminal open?\n";
exit;
}
I�ve checked and made sure that there�s a device on /dev/ttyS0 with minicom,
where I�ve got no problem accessing the device. But I keep getting this error:
Warning: fopen(/dev/ttyS0): failed to open stream: Permission denied in
/var/www/html/s.php on line 85
Line 85 is the fopen line.
Permissions are:
crw-rw-rw- 1 root uucp 4, 64 Apr 5 13:38 /dev/ttyS0
having apache be the groupowner doesn�t change anything
Now, what have I missed?
--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/systemdeveloper
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php