You need to change the maximum memory allowed to a php script to run.
For this you need to open your (location of this file will depend on where php is installed on your machine). In my case is in /etc/php5/apache2/
search for memory_limit
change 16M to 32M
save file, you are good to go!