Solved

serial port  writing in php

Posted on 2006-07-01
4
1,110 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
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.

737 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