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
A 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:
- Log in to the WHMCS Admin Area.
- Go to Utilities > System > PHP Info.
- Find the
fileinfo
extension in the list and check its status:
![PHP Info - fileinfo support enabled](https://media.screensteps.com/image_assets/assets/007/771/756/original/6dd83653-8cfb-4e3b-8379-797c6b1a17e5.png)