Can't get Document(File Name) field to display uploaded doc

I have a form that allows users upload docs. After successful upload and inserting of the record, clicking any of the documents is unresponsive. When I open it into a new tab, tab is titled:

about:blank#blocked

Looking into the console, I see a 500 internal server error.

This is happening only when deployed to an Ubuntu 18.04 server. I can see the files are correctly uploaded to the target folder which is …file/doc/attachments no issues there.

attachments folder is 755, files within it are 644. owner is www-data

Everything works on local windows system.

What am I getting wrong please?

In case anyone runs into same, this resolved:

  • checked nginx log and discovered the cause to be “PHP message: PHP Fatal error: Call to undefined function utf8_decode()”

  • found this and just re-installing php5.6-xml fixed.