Re: pecl install hits memory limit
| From: | Pierre | Date: | Wed, 21 Jun 2006 21:52:07 +0000 |
| Subject: | Re: pecl install hits memory limit | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-3850@lists.php.net to get a copy of this message | ||
Hi Daniel,
On Wed, 21 Jun 2006 17:32:46 -0400
danielc@analysisandsolutions.com (Daniel Convissor) wrote:
> Folks:
>
> I initiated a discussion on pear-dev about this subject, with the
> same subject line as this (pecl install hits memory limit).
>
> The upshot of that discussion was Greg saying:
>
> the pecl command intentionally ignores php.ini to avoid locking
> problems when upgrading php. The easiest solution is:
> pear install pecl/json
>
> This response raises two issues:
>
> 1) The install process MUST fit within PHP's default memory limit of
> 8MB, which is fairly small.
Yes it is small. We cannot use <put your favourite amount here> default
in the cmd call.
> 2) The manual says the way to install pecl packages is "pecl install
> <package_name>". Users should not have to know about some magic
> incantation to make things work. If the documented way doesn't work,
> something is wrong with the way PEAR is doing things.
We should add a FAQ entry then. As we do for people with no root access
for example.
> So, I created a simple patch that sets a higher, though still
> entirely reasonable, limit by putting "-d memory_limit=20M" into the
> pecl shell scripts.
You feel it like entirely reasonable, me too. I know many other who do
not and want to do it themselves. That's also one of the reasons why
PHP still has 8M and not more. The problem with the pecl cmd is
different, see below. You may use pear install pecl/name
> Pierre decided to bogus the bug.
Well, duplicated set it as bogus. I do not like the word "bogus" as it
does not necessary reflect the fact (and is slightly respectless imo).
But that's another topic.
> Pierre, you're great, but you've made the wrong call here. If users
> can't call "pecl install <package_name>", something is fundamentally
> broken.
No, but something may be broken if calling pear suddenly use more than
what they thought. The error message is clear and loud.
> Since the pecl shell script overrides all php.ini settings via the -c
> flag when calling php, there is no workaround. This needs to get
> fixed. There's a simple fix. Let's fix it.
The first reason why we had to do so is about operating on extensions
that are already loaded, there is not much choices as no undl() exists.
The pecl command itself is also about providing some kind of BC for
lazy people, pecl install somepeclpackage instead of pear install
pecl/somepeclpackage.
However, as I said earlier, we should add an entry to the FAQ, that's
the best thing I can propose.
Cheers,
--Pierre