Get The Most Affordable Hosting in the World!

Starting at just $1.87/month, Vercaa offers unbeatable pricing for world-class web hosting services.

Fast, reliable, and secure hosting to power your website without breaking the bank. Plus, enjoy a free CDN for faster loading times worldwide!

Get Started Now!

Symptom

TypeError referencing the guessFileExtension function appears in your PHP error_log file or the Activity Log when importing certain emails into the support ticket system:

TypeError: Return value of WHMCS\File::guessFileExtension() must be of  the type string, null returned in  /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/File.php
 

Cause

The fileinfo function is missing or disabled in your server's PHP configuration.

This is a standard PHP function. WHMCS requires it in order to identify the file extension of email attachments when importing them into the support ticket system.

Solution

Work with your system administrator or hosting provider to enable the fileinfo function in your PHP configuration.

To confirm that you have successfully enabled it:

  1. Log in to the WHMCS Admin Area.
  2. Go to Utilities > System > PHP Info.
  3. Find the fileinfo extension in the list and check its status:
PHP Info - fileinfo support enabled
 
 
 
The End! should you have any inquiries, we encourage you to reach out to the Vercaa Support Center without hesitation.
Was this answer helpful? 1 Users Found This Useful (1 Votes)