Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-03-2012, 05:34 AM
|
#1
|
|
LQ Newbie
Registered: Jun 2008
Posts: 10
Rep:
|
php "system"-call to access tty port, "error accessing"
I have IR module in connected to a tty port, and I'm trying to run an application that would read data from that port, but for some reason my PHP script on Apache can't seem to read the serial port.
The user (www-data) has access to dialup group (in /etc/group), and if I switch over to www-data user, I am able to successfully run the program from the same folder where it resides (same folder with PHP script).
I checked the user who runs the PHP script by system call from PHP to 'whoami' and print it on screen, this is correct, right ?
I'm out of ideas, why Apache can't seem to access the port.
The program starts ok, and I get some proper output, but once trying to access the serial port, something goes awry..
Thanks for all the hints!
Last edited by wedz; 05-03-2012 at 05:35 AM.
Reason: more information
|
|
|
|
05-03-2012, 04:02 PM
|
#2
|
|
Moderator
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,902
|
And what are the perms on the ports?
ls -l /dev/tty (or where ever they are in your distro)?
|
|
|
|
05-05-2012, 06:46 AM
|
#3
|
|
LQ Newbie
Registered: Jun 2008
Posts: 10
Original Poster
Rep:
|
Quote:
Originally Posted by Tinkster
And what are the perms on the ports?
ls -l /dev/tty (or where ever they are in your distro)?
|
Code:
crw-rw---- 1 root dialout 166, 0 2012-05-03 19:10 ttyACM0
I'm running ubuntu (on arm, but I guess that doesnt matter).
To /etc/groups I have added:
Code:
...
dialout:x:20:jlumme,www-data
...
The thing of it is, that I have changed to the www-data user, that apache/php uses, and I am able to read from that port as him 
|
|
|
|
05-22-2012, 07:34 PM
|
#4
|
|
LQ Newbie
Registered: Jun 2008
Posts: 10
Original Poster
Rep:
|
No ideas, anyone ?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:28 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|