Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:19360 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66608 invoked by uid 1010); 4 Oct 2005 05:30:33 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66577 invoked from network); 4 Oct 2005 05:30:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Oct 2005 05:30:32 -0000 X-Host-Fingerprint: 69.227.123.153 adsl-69-227-123-153.dsl.scrm01.pacbell.net Received: from ([69.227.123.153:24022] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id C1/75-54476-77312434 for ; Tue, 04 Oct 2005 01:30:31 -0400 To: internals@lists.php.net,pear-dev@lists.php.net Date: Mon, 03 Oct 2005 22:35:52 +0000 User-Agent: Pan/0.14.2.91 (As She Crawled Across the Table) Message-ID: References: <433EA995.50304@chiaraquartet.net> <434204B3.2000703@chiaraquartet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Posted-By: 69.227.123.153 Subject: Re: phar and e_strict From: curt@php.net (Curt Zirzow) On Mon, 03 Oct 2005 23:27:31 -0500, Greg Beaver wrote: > Curt Zirzow wrote: >> On Sat, 01 Oct 2005 08:21:57 -0700, Greg Beaver wrote: >> >>>I've been running the pear command using PHP 5.1rc1 ever since it came >>>out, and it works just fine. This is a problem specific to the >>>install-pear.phar that in fact did not happen just 2 weeks ago - perhaps >>>something has changed in PHP 5.1 itself? >>> >> 1. zlib is required now with php, and by default php isn't installed >> with zlib nor does configure catch this, so, while make install is >> running and when pear is being installed make dies leaving a bad >> installation. > > I could eliminate this requirement, at the expense of a larger .phar file > (3.3MB instead of 640k). Yeah, that could work. On the other hand I think most/many people will have zlib included. So in that case the installer could/should first check for a compressed file [.phaz?] (if it supports the compression) otherwise just use the uncompressed file. >> 2. I'm not sure if the release of php5.1 is going to include the >> install-pear.phar file, but if I don't have that file within the pear/ >> directory, make install also requires that the system has wget >> installed, causing a fail in make install as well. >> >> I can write a patch for configure.in to check for wget (or fetch on >> *bsd machines), if the .phar file isn't going to be included with a >> release. > > Better (I discussed this with Andi, but haven't had time to do anything > fruitful yet) is to write a short PHP script that would download it. Just > now, it occurs to me that by changing the wget call in Makefile.frag from: > > wget http://pear.php.net/install-pear.phar -nd -P $(srcdir); > > to: > > @$(top_builddir)/sapi/cli/php -dallow_url_fopen=1 -r "$a = > file_get_contents('http://pear.php.net/install-pear.phar');file_put_contents($_SERVER['argv'][1] > . '/install-pear.phar',$a);" $(srcdir) At first look this looks like a good solution, i don't know if it is due to a bad copy paste but my test fails right now. The only problem i see with this is that this occurs on 'make install'. I think ideally the download should at least occur in the configure or make process, especially since pear gets installed so late in the process. If the download fails for what ever reason, the person is going to have a partially installed php. Curt.