prudhvi09:
When I send a command directly from the terminal using the command : echo 1 > /dev/ttyUSB0 it works and '1' is transmitted to the serial port .
This is most helpful information. So it basically works already.
I guess, the problem is, that your php script is just using something else but /dev/ttyUSB0. It is a dams thing, that error output always misses to print out important informations. Extend your error message to print out the name of the port it is using. Then you should see the problem right away.