Cannot get PDF to View or Download - Error 500 or Blank Page

I’m using Version 7.11.6
Sugar Version 6.5.25 (Build 344)
It is set up on a Windows 2012 R2 Server on IIS 8.5.9600
MSSQL 2017
With PHP 7.2.7

We are setting it up still, but no matter what document type we upload, we cannot view them.

We have tried images (PNG and JPG) and PDF files. We upload and when we click them after if I am on an end user computer I get:
This page isn’t working 192.180.45.211 is currently unable to handle this request.
HTTP ERROR 500

If I load it on the hosting server I just get a blank white page.

Here is one of the URLs that errors as well.
/index.php?entryPoint=download&id=a20ad4e0-42e0-9779-1991-5d277505a9fe&type=CMOPR_PP1

Here is one from a built in sub panel
/index.php?entryPoint=download&id=11ec0c87-9ba9-eec3-af88-5d277c921ef7&type=Documents

I have looked through the forums and did not see any issues that had clear solutions for this. One suggested creating a custom PHP file, but I was confuesed if I neede dto make new modules or redo every section that views file to make it work. I feel like maybe something was missed in set up or maybe there is a bad file.

Any help would be appreciated.

Hi there.

500 errors usually provide a error log within your server. Can you see what error is being recorded within the error.log? usually this is within apache2 folders.

I checked the Suitecrm log and there is nothing there.
The Logging on the IIS, either I am not looking at the right spot or it does not show anything relating to the 500 Error.

The strange thing is other pages give a 500 error that has a lot of details. The Document viewing is just either the message I stated above with no way to expand it or see more information or a blank page.

This is from the PHP logging:

[12-Jul-2019 14:04:45 America/New_York] PHP Notice:  Undefined index: module in D:\CRM\include\SugarFields\Fields\File\SugarFieldFile.php on line 89
[12-Jul-2019 14:04:48 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function mime_content_type() in D:\CRM\download.php:183
Stack trace:
#0 D:\CRM\include\MVC\Controller\SugarController.php(1020): require_once()
#1 D:\CRM\include\MVC\Controller\SugarController.php(468): SugarController->handleEntryPoint()
#2 D:\CRM\include\MVC\Controller\SugarController.php(373): SugarController->process()
#3 D:\CRM\include\MVC\SugarApplication.php(113): SugarController->execute()
#4 D:\CRM\index.php(52): SugarApplication->execute()
#5 {main}
  thrown in D:\CRM\download.php on line 183
[12-Jul-2019 14:04:51 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function mime_content_type() in D:\CRM\download.php:183
Stack trace:
#0 D:\CRM\include\MVC\Controller\SugarController.php(1020): require_once()
#1 D:\CRM\include\MVC\Controller\SugarController.php(468): SugarController->handleEntryPoint()
#2 D:\CRM\include\MVC\Controller\SugarController.php(373): SugarController->process()
#3 D:\CRM\include\MVC\SugarApplication.php(113): SugarController->execute()
#4 D:\CRM\index.php(52): SugarApplication->execute()
#5 {main}
  thrown in D:\CRM\download.php on line 183
[12-Jul-2019 14:04:52 America/New_York] PHP Fatal error:  Uncaught Error: Call to undefined function mime_content_type() in D:\CRM\download.php:183
Stack trace:
#0 D:\CRM\include\MVC\Controller\SugarController.php(1020): require_once()
#1 D:\CRM\include\MVC\Controller\SugarController.php(468): SugarController->handleEntryPoint()
#2 D:\CRM\include\MVC\Controller\SugarController.php(373): SugarController->process()
#3 D:\CRM\include\MVC\SugarApplication.php(113): SugarController->execute()
#4 D:\CRM\index.php(52): SugarApplication->execute()
#5 {main}
  thrown in D:\CRM\download.php on line 183

For IIS it is probably logged to the Windows Event Viewer (maybe “Application log”)

Search online for how to get to the logs on your specific server version.

I have checked almost all the error logs I can find.
I cannot find any reference to this current issue.

I do not believe it is even erroring out truly because it is so generic when it fails.

There is no expand or view more or reference to anything. It just says:
This page isn’t working 192.180.45.211 is currently unable to handle this request.
HTTP ERROR 500

or on the server itself I get a blank white page.
/index.php?preview=yes&entryPoint=download&id=a20ad4e0-42e0-9779-1991-5d277505a9fe&type=CMOPR_PP1
/index.php?entryPoint=download&id=11ec0c87-9ba9-eec3-af88-5d277c921ef7&type=Documents

Both of those on the server (localhost) just show a blank white page.

Where I get the very generic error 500 on my computer.

Focus on that “Call to undefined function mime_content_type” fatal error. You should find answers online.

You probably need to enable the php_fileinfo extension in your php.ini

1 Like

That was it. Once I enabled the php_fileinfo extension it started working for viewing and downloading.

Thank you so much!

Hi,

How to enabled the php_fileinfo extension???

Mon KH