0

I'm very new to Laravel. Initially, my project was working perfectly, few weeks now uploaded images refused to display, all uploaded images are broken. When I checked my Laravel Log here is what I get` Please I really need a qualified Laravel developer to help me out.

production.ERROR: Call to undefined function Illuminate\Filesystem\finfo_file() {"exception":"[object] (Symfony\Component\Debug\Exception\FatalThrowableError(code: 0): Call to undefined function Illuminate\Filesystem\finfo_file() at /home/crescen1/crescentlaravel/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:299)

Here is the code I have in my filesystem.php: line 299

/**
 * Get the mime-type of a given file.
 *
 * @param  string  $path
 * @return string|false
 */
public function mimeType($path)
{
    return finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
}

/**
 * Get the file size of a given file.
 *
 * @param  string  $path
 * @return int
 */
public function size($path)
{
    return filesize($path);
}
  • 5
    Possible duplicate of [Call to undefined function Illuminate\Filesystem\finfo\_file()](https://stackoverflow.com/questions/44929092/call-to-undefined-function-illuminate-filesystem-finfo-file) – abestrad Feb 09 '19 at 07:57
  • Have you activated `file_info()` extension? – Iftikhar uddin Feb 09 '19 at 09:21
  • Do you install some package like medialibrary? – Mohammad Fanni Feb 09 '19 at 11:23
  • @iftikhar uddin Yes I have activated file_info(). Initially it was working. suddenly stopped working when my Web Host Provider did a migration. – 365Techsolutions Feb 09 '19 at 16:59
  • Possible duplicate of call to undefined function...at where kindly kind me, I'm very new to Laravel @Abestrad – 365Techsolutions Feb 09 '19 at 17:00
  • Thanks for adding additional info like you activated that before. It's always good to add your research and things you have tried. Did you provider activated it again? You have the ability to check your active extensions? – abestrad Feb 09 '19 at 17:48

0 Answers0