8

As the fileinfo is moved from PECL to PHP. What is the best way to install it through WHM or putty.?

I tried following command:

pecl install fileinfo

and received following 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/local/bin/phpize' in the top level source directory of the module

ERROR: `phpize' failed

Community
  • 1
  • 1
Lalit Arora
  • 301
  • 1
  • 3
  • 9

4 Answers4

9

This extension is enabled by default as of PHP 5.3.0. Before this time, fileinfo was a PECL extension but is no longer maintained there. However, versions prior to 5.3+ may use the » discontinued PECL extension.

Reference:

http://www.php.net/manual/en/fileinfo.installation.php


ERROR: `phpize' failed

This error is displayed because you don't have php-devel package installed

Saket Patel
  • 6,573
  • 1
  • 27
  • 36
7

Are you install php-devel?
phpize execute need's php-devel package. if you are on centos run the following code

yum install php-devel
Vahid Chakoshy
  • 1,497
  • 15
  • 27
  • I tried the command mentioned by you but it results: Setting up Install Process No package php-devel available. Error: Nothing to do – Lalit Arora Apr 18 '12 at 09:29
  • you need to install epel yum's package to install following this link [link](http://www.andresmontalban.com/update-centos-5-php-5-1-to-php-5-3/) – Vahid Chakoshy Apr 18 '12 at 14:58
  • 1
    On CentOS try: `sudo yum --enablerepo=remi,remi-php54 install php-devel` – kenorb Mar 05 '14 at 15:05
3

I encountered this, and needed to install php-fileinfo for WHM on a VPS Dedicated server. This https://www.inmotionhosting.com/support/website/how-to-install-a-php-extension-using-easyapache-4/ was very helpful. I figured id post this for the next guy.

levi
  • 1,566
  • 3
  • 21
  • 37
1

For me this is working

#yum install rh-php70-php-devel

https://centos.pkgs.org/7/centos-sclo-rh/rh-php70-php-devel-7.0.10-2.el7.x86_64.rpm.html