Install fileinfo php extension ubuntu

How To Install "php-fileinfo" Package on Ubuntu

Quick Install Instructions of php-fileinfo on Ubuntu Server. It’s Super Easy! simply click on Copy button to copy the command and paste into your command line terminal using built-in APT package manager.

See below for quick step by step instructions of SSH commands, Copy/Paste to avoid miss-spelling or accidently installing a different package.



Quick Install Steps:

Step 1

Step 2

sudo apt-get install -y php-fileinfo

Step 3

Check the system logs to confirm that there are no related errors. You can use ZoomAdmin to check the logs, manager servers, host multiple websites and apps on your servers and more. The apps run in docker containers, to learn more
see ZoomAdmin Features for list of features and demo videos. And you can start with the Free Plan.

Execute the commands above step by step. You can simply hit the copy button to copy the command and paste into the command line interface.
Note: -y flag means to assume yes and silently install, without asking you questions in most cases.



Detailed Instructions:
Step 1

Run update command to update package repositories and get latest package information.

Step 2

Run the install command with -y flag to quickly install the packages and dependencies.

sudo apt-get install -y php-fileinfo

Step 3

Check the system logs to confirm that there are no related errors. You can use ZoomAdmin to check the logs, manager servers, host multiple websites and apps on your servers and more. The apps run in docker containers, to learn more
see ZoomAdmin Features for list of features and demo videos. And you can start with the Free Plan.

I have tried to install php fileinfo extension in Ubuntu(15.10) and getting errors:

sudo pecl install fileinfo

Error:

WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/fileinfo/in php sources"
WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-update pear.php.net" to update
downloading Fileinfo-1.0.4.tgz ...
Starting to download Fileinfo-1.0.4.tgz (5,835 bytes)
.....done: 5,835 bytes
3 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

If the command failed with 'phpize: not found' then you need to install php5-dev packageYou can do it by running 'apt-get install php5-dev' as a root userERROR: `phpize' failed

and then I tried this command:

sudo apt-get install php5-dev

Output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic
  linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic
  linux-signed-image-4.2.0-16-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

How I can install php fileinfo extension? How I can enable this extension?

On Ubuntu / Debian fileinfo is supposedly installed and enabled by default, so I find your problem a bit puzzling.

I suggest to check if in the file php.ini you have the following line, and if not then add it :

extension=fileinfo.so

If the file is commented out, just delete the ; at the beginning of the line.

If you still have a problem, check if you have the shared library fileinfo.so in the ext folder of PHP.

I have tried to install php fileinfo extension in Ubuntu(15.10) and getting errors:

sudo pecl install fileinfo

Error:

WARNING: "pear/Fileinfo" is deprecated in favor of "channel://php-src/ext/fileinfo/in php sources"
WARNING: channel "pear.php.net" has updated its protocols, use "pecl channel-update pear.php.net" to update
downloading Fileinfo-1.0.4.tgz ...
Starting to download Fileinfo-1.0.4.tgz (5,835 bytes)
.....done: 5,835 bytes
3 source files, building
running: phpize
Cannot find config.m4.
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

If the command failed with 'phpize: not found' then you need to install php5-dev packageYou can do it by running 'apt-get install php5-dev' as a root userERROR: `phpize' failed

and then I tried this command:

sudo apt-get install php5-dev

Output:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
php5-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  linux-headers-4.2.0-16 linux-headers-4.2.0-16-generic
  linux-image-4.2.0-16-generic linux-image-extra-4.2.0-16-generic
  linux-signed-image-4.2.0-16-generic
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

How I can install php fileinfo extension?

How do I install or enable PHP Fileinfo extension?

Windows users must include bundled php_fileinfo. dll DLL file in php. ini to enable this extension. The libmagic library can be bundled with PHP but include PHP specific changes.

How do I enable PHP Fileinfo extension in Cpanel?

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