ports/134880: PHP CLI interactive mode misbehaviour with readline module
Aragon Gouveia
aragon at phat.za.net
Sat May 23 19:50:02 UTC 2009
>Number: 134880
>Category: ports
>Synopsis: PHP CLI interactive mode misbehaviour with readline module
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat May 23 19:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: Aragon Gouveia
>Release: 7.1-STABLE
>Organization:
>Environment:
FreeBSD igor.geek.sh 7.1-STABLE FreeBSD 7.1-STABLE #3: Wed Mar 11 14:24:50 SAST 2009 root at igor.geek.sh:/usr/src/sys/amd64/compile/IGOR amd64
>Description:
PHP's CLI SAPI supports an interactive mode when run with the -a parameter. It behaves very similarly to Python's interactive "shell", complete with command history. An example of this functionality can be seen here:
http://blog.charlvn.com/2009/05/php-interactive-mode.html
This feature is only available when PHP is compiled with Readline support enabled. For some reason, it does not work when Readline support is enabled in the usual FreeBSD ports' modular fashion. It must be enabled during the configuration/compilation of the PHP CLI SAPI itself.
I don't see a workaround to it not working with a modular Readline, so I propose adding a config option to lang/php5 that adds "--with-readline" to the configure parameters.
>How-To-Repeat:
>Fix:
Potential patch attached.
Patch attached with submission follows:
--- Makefile.orig 2009-05-23 21:33:55.000000000 +0200
+++ Makefile 2009-05-23 21:36:14.000000000 +0200
@@ -45,7 +45,8 @@
REDIRECT "Enable force-cgi-redirect support (CGI only)" off \
DISCARD "Enable discard-path support (CGI only)" off \
FASTCGI "Enable fastcgi support (CGI only)" on \
- PATHINFO "Enable path-info-check support (CGI only)" on
+ PATHINFO "Enable path-info-check support (CGI only)" on \
+ READLINE "Enable Readline support (CLI only)" on
CONFLICTS= php4-4*
@@ -73,6 +74,9 @@
PHP_SAPI+= cli
PLIST_SUB+= CLI=""
MAN1+= php.1
+.if defined(WITH_READLINE)
+CONFIGURE_ARGS+=--with-readline
+.endif
.else
PLIST_SUB+= CLI="@comment "
CONFIGURE_ARGS+=--disable-cli
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list