Open your .htaccess file and add the line below to it

php_value memory_limit 40M

This will increase the PHP memory limit, if the altering of the .htaccess file is allowed