php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48125 php-cli makes "less" command behave differently
Submitted: 2009-04-30 20:57 UTC Modified: 2009-05-05 00:07 UTC
From: scot at wilcoxon dot org Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.2.9 OS: Linux Ubuntu 9.04
Private report: No CVE-ID: None
 [2009-04-30 20:57 UTC] scot at wilcoxon dot org
Description:
------------
When php-cli is sending output to "less" it becomes necessary to press ENTER after commands.  It happens both locally and through SSH.

Reproduce code:
---------------
---
From manual page: features.commandline
---
php -r 'print_r(get_defined_constants());' | less

Expected result:
----------------
Output from command with ":" at bottom.  Pressing "n" should start a new page.

Actual result:
--------------
Output from command with ":" at bottom.  Pressing "n" does nothing until ENTER is pressed.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-05-01 17:13 UTC] jani@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.


 [2009-05-05 00:07 UTC] scot at wilcoxon dot org
Documentation is needed of the option which makes php be compatible with pipes.  I suspect Readline is performing initialization of the terminal despite no input being performed.  The --interactive option probably forces such behavior, but the man page did not indicate the opposite of --interactive (--nointeractive did not change the problem).
 [2010-10-29 20:17 UTC] jonhattan at faita dot net
It is a bug in ubuntu but does work for debian. A difference between ubuntu and debian php-cli's is that ubuntu one is compiled with libedit support. I don't know if this is the reason.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 09:01:29 2024 UTC