Solved

serial port  writing in php

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
php ssh2_scp_send 1 46
converting numbers with php 3 26
PHP warning 4 28
datetime in sql 6 22
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…
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.

932 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now