From owner-freebsd-ports@FreeBSD.ORG Fri Jan 6 12:47:41 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 9C701106566B for ; Fri, 6 Jan 2012 12:47:41 +0000 (UTC) (envelope-from the.real.david.allen@gmail.com) Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 319E38FC0C for ; Fri, 6 Jan 2012 12:47:40 +0000 (UTC) Received: by wibhr1 with SMTP id hr1so1565152wib.13 for ; Fri, 06 Jan 2012 04:47:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=QoqnVBYcNn86xCHumlAqBvnpyffmM0XSZS22uM8xcF0=; b=C0Nde+MaF9zhudTA+TOoeZ1xNPCnpov6qZ2S00OWGvVjuoAoI6HRJ/ZlkEuWbYH2PM zPCMVCTZYSHPLvfJEy4WacYZ3hruEprmZQZKvS2A2T1G2BuayBVPMbVtrQxKXd+Jzzy8 C32fk2tyuxS3CGKWHylom58Ia6Ak0rPOYbJ88= MIME-Version: 1.0 Received: by 10.180.79.10 with SMTP id f10mr6834217wix.0.1325852700256; Fri, 06 Jan 2012 04:25:00 -0800 (PST) Received: by 10.180.5.10 with HTTP; Fri, 6 Jan 2012 04:25:00 -0800 (PST) Date: Fri, 6 Jan 2012 04:25:00 -0800 Message-ID: From: David Allen To: freebsd-ports@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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: Fri, 06 Jan 2012 12:47:41 -0000 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: 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 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. Testing the installation of phpsh on a local build server: $ 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 php> d array_merge Traceback (most recent call last): File "/usr/local/bin/phpsh", line 127, in t_c_ret = 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 [ At this point phpsh exits ] Building a phpsh package fails: ===> 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 Stop in /usr/ports/devel/phpsh. *** Error code 1 Stop in /usr/ports/devel/phpsh. Running 'pkg_info -L' reveals the missing files being installed into /usr/local/etc/phpsh, but no such directory (or files) exists. And just for fun, the results after installing phpsh on Mac OS X (where php interactive mode doesn't work either): Warning: require_once(/opt/local/etc/phpsh/rc.php): failed to open stream: No such file or directory in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/phpsh/phpsh.php on line 49 Fatal error: require_once(): Failed opening required '/opt/local/etc/phpsh/rc.php' (include_path='.:') in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/phpsh/phpsh.php on line 49 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? Thanks!