I developed
a health and safety document management website which has been running without
a hitch for around a month now. I had intentionally set file size limits to be 10MB
and decided I would increase this limit as and when larger documents appear.
Today a user was hitting an error with a 17MB document. I made all the changes necessary
to my source code and put the change live, only for the user to report back
that they received an error. Straight away I tried a 12MB document and it
worked, I asked how big the file the user was trying and they told me 17MB. I
did some research on the error message.
“Fatal error: Allowed
memory size of 67108864 bytes exhausted”
A lot of results for that error
message. I managed to find some tutorials on how to resolve the issue on
GoDaddy. Unfortunately the information I found is outdated (or at least no
longer applicable to hosting package I am on)
The articles suggest creating a php5.ini
on the root directory adding the following configuration:
file_uploads = On
post_max_size = 128M
upload_max_filesize = 128M
memory_limit = 128M
However after speaking with GoDaddy support this is no longer correct
(at least not for those on the Economy Linux Hosting
with cPanel package)
To resolve the issue you must
create a .users.ini file.