php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48759 Interactive mode - No prompt, no interaction
Submitted: 2009-07-01 20:16 UTC Modified: 2009-07-02 10:33 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: booi at crunchyroll dot com Assigned:
Status: Closed Package: CGI/CLI related
PHP Version: 5.3.0 OS: Fedora Core 6 x86_64
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: booi at crunchyroll dot com
New email:
PHP Version: OS:

 

 [2009-07-01 20:16 UTC] booi at crunchyroll dot com
Description:
------------
PHP Interactive mode does not give a prompt nor allow any interaction. It is as if Readline was not compiled in.

Reproduce code:
---------------
php -a

Expected result:
----------------
[booi@nexus3 ~]$ php -i | grep readline
Configure Command =>  './configure'  '--enable-fastcgi' '--enable-discard-path' '--enable-force-cgi-redirect' '--with-curl' '--with-gd' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-mcrypt' '--with-mysql=/usr/local/mysql' '--with-openssl' '--with-pear' '--with-readline' '--with-ttf' '--with-freetype-dir=/usr/include/freetype2' '--with-xmlrpc' '--with-zlib' '--without-pdo-sqlite' '--without-sqlite' '--disable-pdo' '--enable-exif' '--enable-ftp' '--enable-inline-optimization' '--enable-mbstring' '--enable-soap' '--enable-sockets'
readline

[booi@nexus3 ~]$ php -v
PHP 5.2.9 (cli) (built: Jun 20 2009 01:06:18) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

[booi@nexus3 ~]$ php -a
Interactive shell

php > 


Actual result:
--------------
[booi@nexus4 bin]$ php -i | grep -i readline
Configure Command =>  './configure'  '--prefix=/usr/local' '--with-apxs2=/usr/local/apache2/bin/apxs' '--disable-debug' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-soap' '--enable-sockets' '--enable-zip' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/include/freetype2' '--with-gd' '--with-jpeg-dir=/usr' '--with-mcrypt' '--with-mhash' '--with-mysql=/usr/local/mysql' '--with-mysqli=mysqlnd' '--with-openssl' '--with-pdo-mysql=mysqlnd' '--with-pear' '--with-png-dir=/usr' '--with-xmlrpc' '--with-zlib' '--with-readline'
readline

[booi@nexus4 bin]$ php -v
PHP 5.3.0 (cli) (built: Jun 30 2009 19:08:04) 
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies

[booi@nexus4 bin]$ php -a
Interactive mode enabled



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-01 20:47 UTC] booi at crunchyroll dot com
A little bit more information. Notable failure during "make test"

FAIL CLI -a and readline [sapi/cli/tests/016.phpt] 

================================================================================
/home/booi/php-5.3.0/sapi/cli/tests/016.phpt
================================================================================
--------------
Snippet no. 1:
--------------
Interactive mode enabled

echo 'Hello world';
exit


--------------
Snippet no. 2:
--------------
Interactive mode enabled

echo 'multine
single
quote';
exit


--------------
Snippet no. 3:
--------------
Interactive mode enabled

echo <<<HEREDOC
Here
comes
the
doc
HEREDOC;


--------------
Snippet no. 4:
--------------
Interactive mode enabled

if (0) {
    echo "I'm not there";
}
echo "Done";


--------------
Snippet no. 5:
--------------
Interactive mode enabled

function a_function_with_some_name() {
    echo "I was called!";
}
a_function_w	);


Done
================================================================================
004+ Interactive mode enabled
004- Interactive shell
006+ echo 'Hello world';
007+ exit
008+ 
006- php > Hello world
007- php > 
012- Interactive shell
013+ Interactive mode enabled
014- php > php ' php ' multine
015+ echo 'multine
016- quote
017- php > 
017+ quote';
018+ exit
019+ 
022- Interactive shell
024+ Interactive mode enabled
024- php > <<< > <<< > <<< > <<< > <<< > Here
026+ echo <<<HEREDOC
027+ Here
028- php > 
031+ HEREDOC;
033+ 
033- Interactive shell
035- php > php { php { php > Done
036- php > 
037+ Interactive mode enabled
039+ if (0) {
040+     echo "I'm not there";
041+ }
042+ echo "Done";
043+ 
041- Interactive shell
043- php > php { php { php > I was called!
044- php > 
048+ Interactive mode enabled
050+ function a_function_with_some_name() {
051+     echo "I was called!";
052+ }
053+ a_function_w	);
054+ 
================================================================================



[booi@nexus4 php-5.3.0]$ uname -a
Linux nexus4 2.6.22.14-72.fc6 #1 SMP Wed Nov 21 14:10:25 EST 2007 x86_64 x86_64 x86_64 GNU/Linux

[booi@nexus4 php-5.3.0]$ rpm -qa | grep readline
readline-5.1-1.1
readline-devel-5.1-1.1
readline-5.1-1.1
readline-devel-5.1-1.1

There are duplicate packages because one is 32bit and one is 64bit.
 [2009-07-01 22:11 UTC] jani@php.net
1. Is readline mentioned in php -m output?
2. If not, check config.log for reason why it failed.
 [2009-07-01 23:58 UTC] booi at crunchyroll dot com
Yes, php -m does list readline as being there.

[booi@nexus4 ~]$ php -m
[PHP Modules]
...
readline
...

[Zend Modules]
 [2009-07-02 10:20 UTC] johannes@php.net
Did you compile PHP without that flag and then recompiled without running "make clean" in between?
 [2009-07-02 10:33 UTC] booi at crunchyroll dot com
Ah, that's it. Sorry about that.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Nov 26 07:01:30 2024 UTC