Allowed memory size of 147281674 bytes exhausted in <some-file>.php on line 57
Then you start to search on the Internet with the above error message and you find advices like:
memory_limit = 32M to your server’s main php.ini file (recommended, if you have access)
memory_limit = 32M to a php.ini file in your application’s php file
ini_set(‘memory_limit’, ’32M’); in your sites/default/settings.php file
php_value memory_limit 32M in your .htaccess file
Let’s say you decide to go with the first suggestion i.e. to increase the PHP memory limit globally all across your applications running on your Debian System. Soon you realized that you are not able to find that master php.ini file on your Debian system.
The easiest way to find is to access the phpinfo() function on your system by launching a web-browser and typing the name (or IP address) of your Debian server like this:
and look for the following entry:
Loaded Configuration File etc/php5/apache2/php.ini
that is basically where your global php.ini file resides on your system.
Any application that uses Apache will read the value of the parameter:
memory_limit = 128M
set in your /etc/php5/apache2/php.ini file.