I am currently using PHP CodeIgniter framework and have an image upload form. When I upload small files the script runs without any trouble, but when I select a file that's, lets say 3mb to upload, the script doesn't run, takes to a page and says "Page failed to load." I checked the php log and apache log. PHP log gave this error.
PHP Fatal error:
Allowed memory size of 33554432 bytes exhausted
(tried to allocate 20736 bytes) in
/Users/Desktop/localhost/system/libraries/Image_lib.php on line 1155
I guess I have to change some settings from CodeIgniter's config file, is this a true assumption?
This is my current php.ini for PHP, which I think doesn't trigger the failure.
; Maximum allowed size for uploaded files.
upload_max_filesize = 32M
; Must be greater than or equal to
upload_max_filesize post_max_size = 32M
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 32M ; Maximum amount of memory a script may consume (8MB)
But the page doesn't load, then fail. It fails processing right when I click submit.
Any hints are appreciated, thanks in advance.
EDIT:
Now I get this error after changing themt o 64M, along with the memory_limit
PHP Fatal error: Allowed memory size of 67108864 bytes
exhausted (tried to allocate 20736 bytes) in
/Users/Desktop/localhost/system/libraries/Image_lib.php on line 1155