How to preview a document

I have created a document (pdf file) in the document module. When I try to preview it (click on the “eye” icon), I receive a HTTP error 500. I’m pretty sure it’s an access problem but I don’t know how to solve this. Can somebody help me?

Thanks a lot.

What is your SuiteCRM version? Is this on Linux or Windows? Are you using XAMPP?

This could be many things

  • ownership/permissions on upload directory
  • htaccess blocking some files
  • missing configuration of your URL in config.php (entries host_name and site_url)
  • errors generating the PDF

You should be able to see exactly what the 500 error is, by checking your web server log (usually called php_errors.log or errors.log).

I think I found it. It seems to be related with issue 1506 and issue 1304. When I click on the hyperlink of a document, it shows me a HTTP error 500. This is cause by the function mime_content_type. So, I replace the call of mime_content_type by a call to [i]get_mime_content_type_from_filename/i in download.php.

We are on version SuiteCRM 7.10.10 with php and IIS (on Windows server 2016)

1 Like