Reputation: 7034
Does PHP has access to the parallel ? I'm trying to write data to the LPT1 port using PHP, but not having luck finding anything.
Upvotes: 0
Views: 912
Reputation: 145512
Writing to the parallel port is as simple as:
file_put_contents("/dev/lp0", "See that was easy.");
Your real problem however sounds to be:
Does PHP has access to the parallel ?
Since PHP usually runs under Apache, the permissions for this device file are insufficient. On Debian systems you would add the www-data
user to the lp
group to make it work.
Upvotes: 2