.htaccess enable php fileinfo extension

2019-06-21 13:26发布

I've used shared host for hosting my application and the version is php5.3.27. I'm getting an error like

 Call to undefined function finfo_open() 

So I've gone through some articles where I suggested by enabling fileinfo extension in .htaccess. For the first time I'm getting this error. Please help me to get the solution. The work would be more appreciated.

4条回答
Emotional °昔
2楼-- · 2019-06-21 13:37

In your .htaccess, put this line:

Windows

php_value extension php_fileinfo.dll

*nix (Linux, Mac, etc)

php_value extension fileinfo.so
查看更多
淡お忘
3楼-- · 2019-06-21 13:44

If you are on shared hosting i continue with the answers above i.e. to include the extensions and is you are on go daddy just create a file in the root directory of your website and name it .user.ini this is how you change settings.

查看更多
成全新的幸福
4楼-- · 2019-06-21 13:47

It's easy actually to access and modify php.ini file to enable file info. I just know by accident. So you search software/service which is there is select PHP version. Click it, and you will see your PHP Version. Try to change first (downgrade or upgrade, up to you) and then you will see that below there is fileinfo which in default not checklist yet. All you have to is, return the version of your PHP, and then checklist fileinfo, and click save. Thats it.

查看更多
何必那么认真
5楼-- · 2019-06-21 13:54

See this answer:

In your php.ini file, make sure you have something like this in it:

extension=fileinfo.so

or if you're on windows, php_fileinfo.dll.

查看更多
登录 后发表回答