
- Views: 476
- Category: Laravel
- Published at: 17 Aug, 2023
- Updated at: 18 Aug, 2023
How to Resolve the requires ext-fileinfo Issue in Laravel Setup Using Composer
Many individuals encounter challenges during a fresh Laravel installation. Often, this stems from not closely following the documentation or overlooking certain necessary extensions. Before initializing a new Laravel setup, updating the composer, or even running the composer installation command for Laravel, it's imperative to enable the required extensions. One extension that often triggers errors, especially for users installing Laravel 9 or 10, is the FileInfo Extension. This issue can be particularly prevalent for those who have recently configured a new VPS or dedicated server.
In this guide, we'll walk you through the process of resolving the FileInfo Extension issue for Laravel. Please note that if you don't have cPanel access, you'll need to reach out to your hosting provider, who should be able to enable the extension for you directly. For those with root access to VPS or dedicated servers, the steps below will guide you on how to enable the extension yourself.
Steps to Enable the FileInfo Extension in WHM:
Step 1: Access your WHM Panel. Upon logging in, navigate to the left side panel. Here, search for EasyApache 4 and select it. Once you've entered this section, locate and click on the Customize button or link.


Step 2: Navigate to PHP Extensions. On the left side, you'll see a link for PHP Extensions. Click on this link. This action will present you with a list of PHP versions and a search box. From this list, select the PHP version where you intend to enable the required extension.
Step 3: Enable the fileinfo extension. Using the search functionality, look for the fileinfo extension. For the sake of this tutorial, we'll be enabling php80-php-fileinfo. However, choose the version that corresponds with your setup. Once you've made your selection, proceed by clicking the Next button. The final screen will provide a summary of changes. Review these, and when ready, hit the Provision button.
Conclusion: Congratulations! You've successfully addressed the "requires ext-fileinfo" problem for Laravel 9 and 10 setups. By ensuring necessary extensions are enabled, you're paving the way for a smoother development experience.
0 Comment(s)