php - Database update fails when file was uploaded -


i have script user can attach file record. file stored separately (not in database). when user not attach file , click on "save record" works fine. when user attaches file next steps:

  1. file uploads correct
  2. script takes db record details using idiorm
  3. script updates field "filesize" on record (i tested script without step - same result)
  4. script tries save record, , this:

    pdoexception  code: hy000  message: sqlstate[hy000]: general error: 2006 mysql server has gone away  file: /home/../includes/idiorm.php  line: 1675 

how can solved?

update:

i found out 2 things:

  1. script returns "general error: 2006 mysql server has gone away" when uploaded file bigger 20 mb , try update database idiorm_record->save().
  2. script not return "general error: 2006 mysql server has gone away" when uploaded file bigger 20 mb , not try update database.
  3. i can upload file bigger 20 mb , run query generated idiorm_record->save() idiorm::raw_exec() , catch no error.

does mean problem connected idiorm?

the problem "wait timeout" setting in mysql. still interesting why plain sql works fine , update via save method on idiorm object causes delay mysql goes away.


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -