Allowed memory size of 8388608 bytes exhausted on RHEL 5

When I tried to install the Fileinfo module from the PECL site, I got the following error message.

$ pecl -v install fileinfo
(snip)
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 143 bytes) in /usr/share/pear/PEAR/PackageFile/v2.php on line 1140

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 100 bytes) in /usr/share/pear/PEAR.php on line 765


Even though I set the memory_limit variable to 32M which is over 8M!

$ php -i | grep memory_limit
memory_limit => 32M => 32M


Here is a workaround for this issue.

Insert the following line to the /usr/share/pear/pearcmd.php file.
@ini_set('memory_limit', '32M');


Then, run the pecl command again. Now you can install the module without the above error message :-)

No comments:

Good Bye, Folks!

As you may have heard, Fujitsu has completely discontinued Data Center Products and Solutions business in North America on April 1st, 2021. ...