From owner-freebsd-ports@FreeBSD.ORG Sun Jan 8 08:54:08 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83406106566B for ; Sun, 8 Jan 2012 08:54:08 +0000 (UTC) (envelope-from aimelynem@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 093DF8FC18 for ; Sun, 8 Jan 2012 08:54:07 +0000 (UTC) Received: by lahl5 with SMTP id l5so1352410lah.13 for ; Sun, 08 Jan 2012 00:54:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:message-id :cc:to:mime-version:x-mailer; bh=3BzEyndDtaLIw+oJ9zTR0doQzBLqdeEbD6gfJP8zp/w=; b=QXfeK5Gbxvwi0nlEmxNGNqeLCRQCX1jySQyBXcLaPzMpnRj3syUm9RxcpDhCd1P0TL /VwYolMJWL/o2r8VJTACHSRiFsZwx2eT8CncUDZ4ROZ1UjXSBX6L1E3FJ9M+4EfEWEnc axKnEvlvP4XsdD84exdZEubBV7lI3YAedRtOI= Received: by 10.112.101.34 with SMTP id fd2mr2393118lbb.16.1326010973176; Sun, 08 Jan 2012 00:22:53 -0800 (PST) Received: from [192.168.0.101] (a88-114-192-35.elisa-laajakaista.fi. [88.114.192.35]) by mx.google.com with ESMTPS id ng10sm66110842lab.13.2012.01.08.00.22.51 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 08 Jan 2012 00:22:51 -0800 (PST) From: Aimelyne Mochiron Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Sun, 8 Jan 2012 10:22:49 +0200 Message-Id: <48A21BD5-9220-4986-B0AD-3CF25963E075@gmail.com> To: David Allen Mime-Version: 1.0 (Apple Message framework v1084) X-Mailer: Apple Mail (2.1084) Cc: freebsd-ports@freebsd.org Subject: Re: PHP Interactive Mode, phpsh X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2012 08:54:08 -0000 Hi David, To enable PHP interactive mode, either readline or libedit must be = compiled into the PHP binary. To do that, edit lang/php5's Makefile to = add to CONFIGURE_ARGS either '--with-readline' or '--with-libedit' (the = library you pick must be installed on your system). Note that php -nm will list readline irrespective of whether you = compiled it or libedit in; phpinfo() will report the correct configure = command, however. I'm afraid I can't help IRT phpsh, as I'm not familiar with it. HTH, AM > Message: 2 > Date: Fri, 6 Jan 2012 04:25:00 -0800 > From: David Allen > Subject: PHP Interactive Mode, phpsh > To: freebsd-ports@freebsd.org > Message-ID: > = > Content-Type: text/plain; charset=3DISO-8859-1 >=20 > The Gods seem to be conspiring against me. I'm flummoxed as to why I > can't get php running in interactive mode (php -a). Some relevant = info: >=20 > php5-5.3.8 PHP Scripting Language > php5-extensions-1.5 A "meta-port" to install PHP extensions > php5-readline-5.3.8 The readline shared extension for php > python27-2.7.2_2 An interpreted object-oriented programming = language >=20 > I tried doing an endrun around the problem by installing python in > conjunction with the /devel/phpsh port. That hasn't quite worked out > either. >=20 > Testing the installation of phpsh on a local build server: >=20 > $ phpsh > Starting php > Install pcntl to enable forking on every command. > type 'h' or 'help' to see instructions & features > php> echo "Hello world\n"; > Hello world >=20 > php> d array_merge >=20 > Traceback (most recent call last): > File "/usr/local/bin/phpsh", line 127, in > t_c_ret =3D s.try_command(line) > File "/usr/local/lib/python2.7/site-packages/phpsh/__init__.py", = line > 909, in try_command > import manual > File "/usr/local/lib/python2.7/site-packages/phpsh/manual.py", line = 4, > in > from sqlite3 import dbapi2 as sqlite > File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in > > from dbapi2 import * > File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in = > from _sqlite3 import * > ImportError: No module named _sqlite3 >=20 > [ At this point phpsh exits ] >=20 > Building a phpsh package fails: >=20 > =3D=3D=3D> Building package for phpsh-20110513 > tar: etc/phpsh/config.sample: Cannot stat: No such file or = directory > tar: etc/phpsh/php_manual.db: Cannot stat: No such file or = directory > tar: etc/phpsh/rc.php: Cannot stat: No such file or directory > tar: Error exit delayed from previous errors. > pkg_create: make_dist: tar command failed with code 256 > *** Error code 1 >=20 > Stop in /usr/ports/devel/phpsh. > *** Error code 1 >=20 > Stop in /usr/ports/devel/phpsh. >=20 > Running 'pkg_info -L' reveals the missing files being installed into > /usr/local/etc/phpsh, but no such directory (or files) exists. >=20 > And just for fun, the results after installing phpsh on Mac OS X = (where > php interactive mode doesn't work either): >=20 > Warning: require_once(/opt/local/etc/phpsh/rc.php): failed to open > stream: No such file or directory in >=20 > = /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/= site-packages/phpsh/phpsh.php >=20 > on line 49 >=20 > Fatal error: require_once(): Failed opening required > '/opt/local/etc/phpsh/rc.php' (include_path=3D'.:') in >=20 > = /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/= site-packages/phpsh/phpsh.php >=20 > on line 49 >=20 > Could someone shed some light as to why php interactive mode doesn't = work > with FreeBSD? Or alternatively, how to fix my phpsh installation and = get > a package made? >=20 > Thanks! >=20