You have to increase your php memory. There are 3 ways to do it.
Often provider don't give permissions to php.ini or disabled the function in .htacces to increase memory. Than you only have the chance to do it directly in php.
php.ini
Change this line memory_limit = 64M
After that you must restart your webserver.
direct php
Use ini_set('memory_limit', '64M');
to set are memory size.
.htaccess
Add php_value memory_limit 64M
to your file.
EDIT : Change value in examples.
EDIT 2 : There are a lot of people which have the same question. Please read this!