April 20, 2012
Internal server error when uploading large files in php
Question by Kyokasuigetsu
I’m using codeIgniter and I’m getting internal server error when trying to upload large files (might be 1Mb and up)
The file upload script is working because it uploads to the folder in the server. But saving the file into the database it doesn’t work anymore. I’ve already tried changing the following but still doesn’t work:
php.ini
- post_max_size = 50M
- upload_max_filesize = 20M
my.ini
- max_allowed_packet = 2048M
- max_execution_time = 150
Where else do I have to check to ensure that the file upload to the database works.
Answer by Starx
Save the files do the directory, not on the database. You might want to save the path though in the databse.
If you want to know WHY, here are some previous post you should check.