|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67212 phpdbg uses non-standard TIOCGWINSZ
Submitted: 2014-05-06 07:56 UTC Modified: 2014-06-15 13:54 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: Assigned: tyrael (profile)
Status: Closed Package: Compile Failure
PHP Version: 5.6Git-2014-05-06 (Git) OS: Solaris
Private report: No CVE-ID: None
 [2014-05-06 07:56 UTC]
phpdbg is checking for ioctl presence, but not for TIOCGWINSZ availability. i.e. on Solaris the build fails.

Also if ioctl isn't found a terminal width of 100 is assumed, most systems use 80 characters by default

Test script:
./configure --disable-all && make

Expected result:
Successful build

Actual result:
 /usr/gcc/4.5/bin/gcc -D_GNU_SOURCE sapi/phpdbg/phpdbg_utils.c -o sapi/phpdbg/phpdbg_utils.o
sapi/phpdbg/phpdbg_utils.c: In function ‘phpdbg_get_terminal_width’:
sapi/phpdbg/phpdbg_utils.c:441:17: error: storage size of ‘w’ isn’t known
sapi/phpdbg/phpdbg_utils.c:443:34: error: ‘TIOCGWINSZ’ undeclared (first use in this function)
sapi/phpdbg/phpdbg_utils.c:443:34: note: each undeclared identifier is reported only once for each function it appears in
sapi/phpdbg/phpdbg_utils.c:441:17: warning: unused variable ‘w’
make: *** [sapi/phpdbg/phpdbg_utils.lo] Error 1


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-06 07:56 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: krakjoe
 [2014-06-07 14:46 UTC]
-Summary: phpdb uses non-standard TIOCGWINSZ +Summary: phpdbg uses non-standard TIOCGWINSZ
 [2014-06-15 13:54 UTC]
-Status: Assigned +Status: Closed -Assigned To: krakjoe +Assigned To: tyrael
 [2014-06-15 13:54 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 08 19:01:28 2023 UTC