From: Tony van der Hoff on
Hi,

I'm a complete newbie with PEAR, but have done quite a lot of PHP work,
but it's been a while.

So, I'm running Debian Lenny on my development box, which contains a
reasonably up-to-date PHP/PEAR (I think):

$ pear version
PEAR Version: 1.7.1
PHP Version: 5.2.6-1+lenny4
Zend Engine Version: 2.2.0
Running on: Linux tony-lx 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC
2009 i686

I've worked my way through the instructions at
http://pear.php.net/manual/en/installation.php
and everything, including "Checking if PEAR works" seems fine. I didn't
have to change any settings, and I was quite pleased with myself!

The objective of this was:
$ pear install HTML_Template_PHPLIB-1.5.0
which resulted in:
Cannot install, php_dir for channel "pear.php.net" is not writeable by
the current user

So I tried it as root:
root@/home/tony$ pear install HTML_Template_PHPLIB-1.5.0
Could not open input file: /usr/local/lib/php/pearcmd.php

So I thought this might fix it:
tony(a)tony-lx:~$ sudo chgrp -R adm /usr/share
(I'm member of adm)

Better, but no cigar:
tony(a)tony-lx:~$ pear install HTML_Template_PHPLIB-1.5.0
downloading HTML_Template_PHPLIB-1.5.0.tgz ...
Starting to download HTML_Template_PHPLIB-1.5.0.tgz (18,028 bytes)
.......done: 18,028 bytes
ERROR: failed to write /usr/bin/.tmphtml_template_phplibtool:
copy(/usr/bin/.tmphtml_template_phplibtool): failed to open stream:
Permission denied

Now, before I stumble around any more, reconfiguring my entire system, I
figure I need help, so here I am. Can anyone please give me a pointer?

TIA, Tony
--
Tony van der Hoff | mailto:tony(a)vanderhoff.org
Buckinghamshire, England |
From: Brett Bieber on
Hi Tony,

On Sat, Feb 13, 2010 at 11:54 AM, Tony van der Hoff <tony(a)vanderhoff.org> wrote:
> Hi,
>
> I'm a complete newbie with PEAR, but have done quite a lot of PHP work, but
> it's been a while.
>
> So, I'm running Debian Lenny on my development box, which contains a
> reasonably up-to-date PHP/PEAR (I think):
>
> $ pear version
> PEAR Version: 1.7.1
> PHP Version: 5.2.6-1+lenny4
> Zend Engine Version: 2.2.0
> Running on: Linux tony-lx 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009
> i686

Eh, 1.7.1 is about 2 years old, so I wouldn't say that's up to date,
but it should work unless your distro has managed to distribute pear
with a broken configuration.

> I've worked my way through the instructions at
> http://pear.php.net/manual/en/installation.php
> and everything, including "Checking if PEAR works" seems fine. I didn't have
> to change any settings, and I was quite pleased with myself!
>
> The objective of this was:
> $ pear install HTML_Template_PHPLIB-1.5.0
> which resulted in:
> Cannot install, php_dir for channel "pear.php.net" is not writeable by the
> current user
>
> So I tried it as root:
> root@/home/tony$ pear install HTML_Template_PHPLIB-1.5.0
> Could not open input file: /usr/local/lib/php/pearcmd.php
>
> So I thought this might fix it:
> tony(a)tony-lx:~$ sudo chgrp -R adm /usr/share
> (I'm member of adm)
>
> Better, but no cigar:
> tony(a)tony-lx:~$ pear install HTML_Template_PHPLIB-1.5.0
> downloading HTML_Template_PHPLIB-1.5.0.tgz ...
> Starting to download HTML_Template_PHPLIB-1.5.0.tgz (18,028 bytes)
> ......done: 18,028 bytes
> ERROR: failed to write /usr/bin/.tmphtml_template_phplibtool:
> copy(/usr/bin/.tmphtml_template_phplibtool): failed to open stream:
> Permission denied
>
> Now, before I stumble around any more, reconfiguring my entire system, I
> figure I need help, so here I am. Can anyone please give me a pointer?

PEAR installs files to the directories specified in pear's
configuration. You can view the configuration with:
pear config-show

and set a config variable with:
pear config-set bin_dir /usr/local/bin

You'll need access to all the *_dir directories if you'd like to
install packages without elevated permissions.

A system-wide PEAR install usually does require sudo pear install
Package but you shouldn't need to chgrp any files to get it to work
out of the box.

If you've installed pear from a package provided by your distro and it
doesn't work, you might look for a bug report in their bug tracker, or
file a new one with them.

--
Brett Bieber
From: Tony van der Hoff on
On 15/02/10 14:39, Brett Bieber wrote:
> Hi Tony,
>
> On Sat, Feb 13, 2010 at 11:54 AM, Tony van der Hoff<tony(a)vanderhoff.org> wrote:
>> Hi,
>>
>> I'm a complete newbie with PEAR, but have done quite a lot of PHP work, but
>> it's been a while.
>>
>> So, I'm running Debian Lenny on my development box, which contains a
>> reasonably up-to-date PHP/PEAR (I think):
>>
>> $ pear version
>> PEAR Version: 1.7.1
>> PHP Version: 5.2.6-1+lenny4
>> Zend Engine Version: 2.2.0
>> Running on: Linux tony-lx 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009
>> i686
>
> Eh, 1.7.1 is about 2 years old, so I wouldn't say that's up to date,
> but it should work unless your distro has managed to distribute pear
> with a broken configuration.
>
>> I've worked my way through the instructions at
>> http://pear.php.net/manual/en/installation.php
>> and everything, including "Checking if PEAR works" seems fine. I didn't have
>> to change any settings, and I was quite pleased with myself!
>>
>> The objective of this was:
>> $ pear install HTML_Template_PHPLIB-1.5.0
>> which resulted in:
>> Cannot install, php_dir for channel "pear.php.net" is not writeable by the
>> current user
>>
>> So I tried it as root:
>> root@/home/tony$ pear install HTML_Template_PHPLIB-1.5.0
>> Could not open input file: /usr/local/lib/php/pearcmd.php
>>
>> So I thought this might fix it:
>> tony(a)tony-lx:~$ sudo chgrp -R adm /usr/share
>> (I'm member of adm)
>>
>> Better, but no cigar:
>> tony(a)tony-lx:~$ pear install HTML_Template_PHPLIB-1.5.0
>> downloading HTML_Template_PHPLIB-1.5.0.tgz ...
>> Starting to download HTML_Template_PHPLIB-1.5.0.tgz (18,028 bytes)
>> ......done: 18,028 bytes
>> ERROR: failed to write /usr/bin/.tmphtml_template_phplibtool:
>> copy(/usr/bin/.tmphtml_template_phplibtool): failed to open stream:
>> Permission denied
>>
>> Now, before I stumble around any more, reconfiguring my entire system, I
>> figure I need help, so here I am. Can anyone please give me a pointer?
>
> PEAR installs files to the directories specified in pear's
> configuration. You can view the configuration with:
> pear config-show
>
> and set a config variable with:
> pear config-set bin_dir /usr/local/bin
>
> You'll need access to all the *_dir directories if you'd like to
> install packages without elevated permissions.
>
> A system-wide PEAR install usually does require sudo pear install
> Package but you shouldn't need to chgrp any files to get it to work
> out of the box.
>
> If you've installed pear from a package provided by your distro and it
> doesn't work, you might look for a bug report in their bug tracker, or
> file a new one with them.
>

Thanks for responding to this, Brett; I can confirm that Debian has a
number of bugs outstanding against this package, one of which seems
apposite.

Meanwhile, I've installed PEAR in my home; whilst not the ideal
solution, I can live with it until Debian fixes the package.

My apologies for creating noise on this list.

Cheers, and thanks again,
Tony

--
Tony van der Hoff | mailto:tony(a)vanderhoff.org
Buckinghamshire, England |