Solved

serial port  writing in php

Posted on 2006-07-01
4
1,093 Views
Last Modified: 2012-08-13
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
0
Comment
Question by:abdul_baig
4 Comments
 
LVL 29

Accepted Solution

by:
TeRReF earned 250 total points
ID: 17022872
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
 
LVL 49

Assisted Solution

by:Roonaan
Roonaan earned 250 total points
ID: 17022880
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question