Sunday, December 9, 2007

PHP Allowed memory size of 8388608 bytes exhausted

If you try to install PHP PECL package and get an "Allowed memory size of 8388608 bytes exhausted" you should know that pecl ignores php.ini memory_limit directive. As suggested in
this post, you should use pear instead of pecl to install you package. For example, instead of doing

[root@hostname tmp]# pecl -v install APC

you should do

[root@hostname tmp]# pecl -v download APC
[root@hostname tmp]# pear -v install APC-3.0.15.tgz

7 comments:

  1. I've also learned that you can use:

    pear install pecl/_whatever_

    rather than

    pecl install _whatever_

    and the first won't complain about the limit.

    ReplyDelete
  2. Thank you so much! You saved me so much time! (I'm a Lebanese neighbor, shalom. Geekness knows no borders.)

    ReplyDelete
  3. Oh man, great post!!!

    ReplyDelete
  4. Excellent job!
    Wish I had known this ages ago!

    ReplyDelete
  5. Very useful post and comment thread, specially the tip from lefty crupps, thanks a lot for addressing this issue, Nir.

    Best,
    Aleksey

    ReplyDelete

[Due to much spam, comments are now moderated and will be posted after review]