If the memory_limit is alright, then it's probably a memory limitation on the process (either apache or php). Put the following code in a file and open it's URL in the browser. You should then get an output of memory limits for the running process (if it's a linux box)
<?php
echo '<pre>';
print system('ulimit -a');
echo '</pre>';
?>