problem in communicating with serial using php

hi there.. first of all forgive me if this is not the suitable place to post this problem..im new here :). to the problem: im trying to send data on serial port on linux ubuntu 5.10 server through php script using the php serial class (im not allowed to put links yet :()

when im trying to set the serial device for use (through deviceSet function provided in the php serial class) the function checks the result of this command "stty -F/dev/ttyS0" to be 0 (if ($this->_exec("stty -F " . $device) === 0)//line 92 in php_serial.class.php) the problem is that when i print the result of this command it prints 1 when i type the command directly to the terminal the output is: speed 9600 baud; line=0; -brkint -imaxbel im not a linux expert.. so i dont know what the "stty -F" really does and what it means when the result of it is 0 or 1

so can anybody help specifiying where the problem is?

here is the link for php serial class:

http://phpclasses.phpsoft.it/package/3679-PHP-Communicate-with-a-serial-port.html

I'm replying because nobody else has - I don't use linux any more and I'm at work so can't have a look at that library. Sorry in advance if I'm not much use!

The stty command sets up your com port. /dev/ttyS0 is your com port - is that where your arduino is? I don't know how you'd check, but you need the ttyS0 bit to be the same port name as your arduino is on. The -f is a switch to tell the stty command that you're about to tell it which file to use (which in this case is the serial port).

Have you tried changing that line to read ===0, just to see if it works?

thx for your reply i was going to give up .. anyways im using pic microcontroller and yes it is on serial port ttyS0. i didnt try changing the line but i'll try it and see how it goes but i would appreciate it if u can tell me what the value of stty -F means ? so what it means when its 0 or 1 thanks again