How to insert large files in mysql database using php? [closed]
- by anjan
Hi!
I want to upload a large file of size 10M max to my mysql database. Using .htaccess i changed the PHP's own file upload limit to "10485760" = 10M, i am able to upload files upto 10M size without any problem.
But i can not insert the file in database if it is more that 1M in size.
i am using file_get_contents to read all file data and pass it to the insert query as a string to be inserted into a LONGBLOB field.
But files with more than 1M size is not being added to database, though i can use print_r($_FILES) to examine that the file uploaded correctly. Any help will be appreciated and i will need it within next 6 hours. So, please help!
best regards,
Anjan
* This is a duplicate of http://stackoverflow.com/questions/492549/how-can-i-insert-large-files-in-mysql-db-using-php *