Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install fileinfo php extension

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

like image 821
Lalit Arora Avatar asked Apr 17 '12 10:04

Lalit Arora


3 Answers

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

like image 153
Saket Patel Avatar answered Oct 22 '22 05:10

Saket Patel


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
like image 6
Vahid Chakoshy Avatar answered Oct 22 '22 03:10

Vahid Chakoshy


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.

like image 3
kray Avatar answered Oct 22 '22 04:10

kray