From owner-freebsd-ports-bugs@FreeBSD.ORG Sat May 23 19:50:01 2009 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D3BB106566C for ; Sat, 23 May 2009 19:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6813A8FC16 for ; Sat, 23 May 2009 19:50:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NJo1TE034357 for ; Sat, 23 May 2009 19:50:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4NJo1dS034356; Sat, 23 May 2009 19:50:01 GMT (envelope-from gnats) Resent-Date: Sat, 23 May 2009 19:50:01 GMT Resent-Message-Id: <200905231950.n4NJo1dS034356@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Aragon Gouveia Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9D111065676 for ; Sat, 23 May 2009 19:41:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id A7E9E8FC1F for ; Sat, 23 May 2009 19:41:08 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n4NJf8ir015222 for ; Sat, 23 May 2009 19:41:08 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n4NJf8s8015221; Sat, 23 May 2009 19:41:08 GMT (envelope-from nobody) Message-Id: <200905231941.n4NJf8s8015221@www.freebsd.org> Date: Sat, 23 May 2009 19:41:08 GMT From: Aragon Gouveia To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/134880: PHP CLI interactive mode misbehaviour with readline module X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2009 19:50:02 -0000 >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@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: