Home > Archive > PHP PEAR Questions and Answers > July 2006 > pecl install hits memory limit
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
pecl install hits memory limit
|
|
| Daniel Convissor 2006-07-04, 6:04 pm |
| 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.
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.
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. I located an existing bug on this matter,
http://pear.php.net/bugs/bug.php?id=6288, and submitted a link to the
patch there.
Pierre decided to bogus the bug. 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.
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.
Thanks,
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
data intensive web and database programming
http://www.AnalysisAndSolutions.com/
4015 7th Ave #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409
| |
| Pierre 2006-07-04, 6:04 pm |
| 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
|
|
|
|
|