serial port writing in php

i have to write on serial port but in doing so an error has occured ......Warning: fopen(COM1:): failed to open stream: Permission denied ,,,,,,,kindly solve my problem its urgent
abdul_baigAsked:
Who is Participating?
 
TeRReFCommented:
Make sure the user the webserver is running under has the proper rights to access the serial port.
TO test
chmod 777 /dev/whateveryourcom1portis
0
 
RoonaanCommented:
Have you made sure that the com port isn't already in use?

http://nl3.php.net/manual/en/function.fopen.php#16296
> php at themastermind1 dot com
>24-Oct-2001 07:37
>I have found that I can do fopen("COM1:", "r+"); to open the comport in windows. You have to make sure the >comport isn't already open or you will get a permission denied.
>
>I am still playing around with this but you have to somehow flush what you send to the comport if you are trying to >communicate realtime with a device.

-r-
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.