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.

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to