skip to Main Content

Using Suite crm 7.9.1 . newbie to suitecrm.

I created a Person Form in Campaigns module . Created successfully . But when i tried to download it , got the below error .

Fatal error: Uncaught Error: Call to undefined function
mime_content_type() in /home/testsite/public_html/download.php:180
Stack trace: #0
/home/testsite/public_html/include/MVC/Controller/SugarController.php(1007):
require_once() #1
/home/testsite/public_html/include/MVC/Controller/SugarController.php(458):
SugarController->handleEntryPoint() #2
/home/testsite/public_html/include/MVC/Controller/SugarController.php(366):
SugarController->process() #3
/home/testsite/public_html/include/MVC/SugarApplication.php(108):
SugarController->execute() #4
/home/testsite/public_html/index.php(53): SugarApplication->execute()
#5 {main} thrown in /home/testsite/public_html/download.php on line 180

when i browsed on this error got a solution that to install this extension . I am using PHP 7 .

Adding the extensions to cpanel in live , is it safe .. As it is shared host , does it affects other php projects .

When i executed phpinfo found something about mime_type . below

default_mimetype - text/html
mbstring.http_output_conv_mimetypes - ^(text/|application/xhtml+xml)

2

Answers


  1. You need to install fileinfo extension in order to use mime_content_type. In debian based system you can install it via apt: apt-get install php-mime-type

    More info: http://php.net/manual/en/book.fileinfo.php

    Login or Signup to reply.
  2. I was trying to get the mimeType of a file using mime_content_type() but it was not working.

    Here this works for me:

    $file = $request->file('FILE_NAME_IN_REQUEST');
    $mimeType = $file->getClientmimeType();
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search