Solved

serial port  writing in php

Posted on 2006-07-01
4
1,077 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
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.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

810 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