It's not because the post_max_size or upload_max_filesize, but because of memory limit
try this
ini_set("memory_limit","256M");
134217728 bytes = 128MB
or from php.ini
memory_limit = 256M
But in general, when you got this error, it simply means that your code is not efficient yet. Because you are exhausting the allocated memory to run just this one PHP page. It's already 128 MB you know.
If you simply just increase the memory limit, the concurrent PHP processes that can be opened at the same time would be reduced significantly.
Try to think of massive multi-user environment, when this PHP page is opened by many users at the same time, can the server handle it all with the server's physical memory ?
Simply put, can you share your piece of code here so we all can help you to make it more efficient?