pear

29th July
2009
written by Chris

I was installing APC on a server and ran across this error:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 92160 bytes) in /usr/share/pear/PEAR/PackageFile/v2/Validator.php on line 1831

One would assume that fixing this would be to edit the php.ini file and change the memory settings. However, that is not the case here. In order to fix this, you would edit /usr/share/pear/pearcmd.php and add the following line to the very top of the file (after the opening PHP tag):

@ini_set('memory_limit', '16M');

Adjust the memory limit to what you need. For good measure, I remove that line once I am done installing whatever it is I need to install.

Tags: , ,