php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55496 Interactive mode doesn't force a newline before the prompt
Submitted: 2011-08-23 20:47 UTC Modified: 2012-02-01 19:09 UTC
Votes:4
Avg. Score:4.0 ± 0.7
Reproduced:4 of 4 (100.0%)
Same Version:3 (75.0%)
Same OS:4 (100.0%)
From: sixd@php.net Assigned: johannes (profile)
Status: Closed Package: CGI/CLI related
PHP Version: 5.4SVN-2011-08-23 (SVN) OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sixd@php.net
New email:
PHP Version: OS:

 

 [2011-08-23 20:47 UTC] sixd@php.net
Description:
------------
The call to readline_shell_write() in readline_shell_run() is effectively a no-op 
so no newline is forced before the prompt.

Expected result:
----------------
$ php -a
Interactive shell

php > echo "hi";
hiphp > 

Actual result:
--------------
$ php -a
Interactive shell

php > echo "hi";
hi
php > 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-08-23 20:47 UTC] sixd@php.net
-Assigned To: +Assigned To: johannes
 [2011-08-23 20:58 UTC] sixd@php.net
The expected & actual sections above should be swapped.
 [2011-08-23 20:59 UTC] sixd@php.net
Automatic comment from SVN on behalf of sixd
Revision: http://svn.php.net/viewvc/?view=revision&revision=315404
Log: Update log, marking 5.4 and trunk as XFAIL due to bug #55496
 [2012-02-01 19:09 UTC] sixd@php.net
For the record, this changed (broke) in PHP 5.4.
 [2012-03-28 08:34 UTC] yohgaki@php.net
Currently, CLI's interactive mode seems completely broken.

--------------
[yohgaki@dev php-src]$ ./sapi/cli/php -v
PHP 5.5.0-dev (cli) (built: Mar 28 2012 17:33:51) (DEBUG)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
[yohgaki@dev php-src]$ ./sapi/cli/php -a
Interactive mode enabled

echo 88888



echo 88888



[yohgaki@dev php-src]$ 
------------
 [2012-03-28 08:41 UTC] yohgaki@php.net
--with-readline, I get this. 

---
[yohgaki@dev php-src]$ ./sapi/cli/php -a
Interactive mode enabled

php > echo 8888;
8888php > 
---

We probably should warning message when PHP is built without readline/libedit.

Related bugs:
https://bugs.php.net/bug.php?id=51695
https://bugs.php.net/bug.php?id=55257
 [2014-07-24 15:02 UTC] johannes@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src.git;a=commit;h=71d3a69425449972f4efdf7228c6f7e49e090755
Log: Fix bug #55496 Interactive mode doesn't force a newline before the prompt
 [2014-07-24 15:02 UTC] johannes@php.net
-Status: Assigned +Status: Closed
 [2014-07-30 09:52 UTC] tyrael@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src.git;a=commit;h=71d3a69425449972f4efdf7228c6f7e49e090755
Log: Fix bug #55496 Interactive mode doesn't force a newline before the prompt
 [2014-08-04 08:26 UTC] ab@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src.git;a=commit;h=71d3a69425449972f4efdf7228c6f7e49e090755
Log: Fix bug #55496 Interactive mode doesn't force a newline before the prompt
 [2014-08-04 08:43 UTC] ab@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src.git;a=commit;h=71d3a69425449972f4efdf7228c6f7e49e090755
Log: Fix bug #55496 Interactive mode doesn't force a newline before the prompt
 [2014-08-04 09:59 UTC] dmitry@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src.git;a=commit;h=71d3a69425449972f4efdf7228c6f7e49e090755
Log: Fix bug #55496 Interactive mode doesn't force a newline before the prompt
 [2014-10-07 23:13 UTC] stas@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=71d3a69425449972f4efdf7228c6f7e49e090755
Log: Fix bug #55496 Interactive mode doesn't force a newline before the prompt
 [2014-10-07 23:24 UTC] stas@php.net
Automatic comment on behalf of johannes
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=71d3a69425449972f4efdf7228c6f7e49e090755
Log: Fix bug #55496 Interactive mode doesn't force a newline before the prompt
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jan 30 16:01:30 2025 UTC