0

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.

Wern Ancheta
  • 22,397
  • 38
  • 100
  • 139

3 Answers3

2

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.

  1. Storing Documents as Blobs in a Database - Any disadvantages?
  2. Storing Images in DB - Yea or Nay?
Community
  • 1
  • 1
Starx
  • 77,474
  • 47
  • 185
  • 261
0

Restart your apache server and try again.

Bibin Velayudhan
  • 3,043
  • 1
  • 22
  • 33
  • And how will this be possible to do on a shared server and other types of hosting plans? – Starx Apr 20 '12 at 10:33
0

I think think you should save files to Database ..but if you insist try NoSQL Solutions instead .. such as MongoDB .. its faster and better

Baba
  • 94,024
  • 28
  • 166
  • 217