Foyaz Ullah Shahin
Foyaz Ullah Shahin

Reputation: 424

How to enable extension=fileinfo.so in my shared hosting?

This error message appeared when I tried to upload an image on my shared hosting: "PHP Fileinfo extension must be installed/enabled to use Intervention Image". I then modified my php.ini settings using .htaccess.

Now my .htaccess file looks like:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
<IfModule mod_suphp.c>
    suPHP_ConfigPath /home/username/public_html/subfolder
    </IfModule>    
    </IfModule>

The subfolder specified in the .htaccess file is where my Laravel project is located, and it's where I want to serve my application.

To enable PHPFileinfo, I wrote the following code in the php.ini file located in the project root:

extension=fileinfo.so
extension=pdo.so
extension=pdo_mysql.so

It's not working on my shared hosting!

How can I fix this?

Upvotes: 5

Views: 22012

Answers (3)

Alireza
Alireza

Reputation: 1764

Your host provider need to have the extension file in their php config so it can't be done from your side .

Upvotes: 2

ikeri ebenezer
ikeri ebenezer

Reputation: 29

You can enable fileinfo extension from cpanel 1 .Go to SOFTWARE=> 2. Select PHP Version=>fileinfo check box and enable fileinfo extension. 3. refresh your website and thats all.

Upvotes: 1

Samar Gurjar
Samar Gurjar

Reputation: 241

You can enable fileinfo extension from cpanel 1 Go to SOFTWARE=>Select PHP Version=>fileinfo check box and enable fileinfo extension.enter image description here

Upvotes: 6

Related Questions