@ryank30 You have to uncomment this line in your php.ini file
extension=php_fileinfo.dll
That is just remove ; from the front of the above line. That will solve the problem.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I have a form which takes input data as well as an image file.
I have created a request called "AccountRequest" and I put some validation filters for "file".
public function rules()
{
return [
'first_name' => 'required|min:3',
'last_name' => 'required|min:3',
'email' => 'required|email|max:255',
'address' => 'required:min:5',
'city' => 'required:min:3',
'postal_code' => 'required:min:6',
'file' => 'required|image|mimes:jpg,jpeg,png,gif|size:900'
];
}
if you look at the line: 'file' => 'required|image|mimes:jpg,jpeg,png,gif|size:900', I am filtering this file according to this criteria.
When I uploaded an image file and submit, I got the error message saying:
LogicException in MimeTypeGuesser.php line 127: Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?)
Could you help me how to resolve this issue?
Thanks in advance
Please or to participate in this conversation.