|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58488 argument 2 of dio_tcsetattr doesn't accept a variable
Submitted: 2009-01-04 07:33 UTC Modified: 2009-01-18 12:57 UTC
From: romain dot dessort at gmail dot com Assigned:
Status: Not a bug Package: dio (PECL)
PHP Version: 5.2.5 OS: Debian 4.0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: romain dot dessort at gmail dot com
New email:
PHP Version: OS:


 [2009-01-04 07:33 UTC] romain dot dessort at gmail dot com
When I run the example of PHP documentation
(, all is OK.
But when replace the baud rate value (9600) by a variable containing the
same value, I have a php warning :

Warning: dio_tcsetattr() [function.dio-tcsetattr]: invalid baud rate 0 in
/var/www/lampes.php on line 34

I verified by an "echo $var;", this variable isn't equal to 0 !

This is the same problem with the other attributes (bit, stop and parity).

Reproduce code:
echo $SPEED;

$fd = dio_open("/dev/ttyS0" , O_WRONLY | O_NOCTTY | O_NONBLOCK);
dio_tcsetattr($fd , array('baud' => $SPEED, 'bit' => 8 , 'stop' => 1 , 'parity' => 0));


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-18 12:57 UTC] romain dot dessort at gmail dot com
So I have rewrite this code in an empty file, and it works ! I think there were some hidden characters in the hold file.

Sorry for this bogus bug.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Sep 27 05:01:25 2023 UTC