Page 1 of 1

PHP Fileinfo

Posted: Thu Feb 17, 2011 3:22 pm
by breun
Could a package for the PHP PECL Fileinfo extension be added to the atomic repo? http://php.net/manual/en/book.fileinfo.php

The EPEL repository has a package for CentOS PHP packages (php-pecl-Fileinfo), but alas it is missing for the atomic PHP distribution.

Re: PHP Fileinfo

Posted: Fri Feb 18, 2011 6:52 pm
by scott
No problem, should be up in the repo shortly

Re: PHP Fileinfo

Posted: Sat Feb 19, 2011 6:35 am
by breun
Thanks a bunch!

However, it doesn't seem to want to install because of the php-api version dependency:

Code: Select all

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pecl-Fileinfo.i386 0:1.0.4-2.el5.art set to be updated
--> Processing Dependency: php-api = 20090626 for package: php-pecl-Fileinfo
--> Finished Dependency Resolution
php-pecl-Fileinfo-1.0.4-2.el5.art.i386 from atomic has depsolving problems
  --> Missing Dependency: php-api = 20090626 is needed by package php-pecl-Fileinfo-1.0.4-2.el5.art.i386 (atomic)
Error: Missing Dependency: php-api = 20090626 is needed by package php-pecl-Fileinfo-1.0.4-2.el5.art.i386 (atomic)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
The php-common package in atomic only provides 'php-api = 20041225':

Code: Select all

# rpm -q --whatprovides php-api
php-common-5.2.17-1.el5.art.i386
# rpm -q --provides php-common | grep php-api
php-api = 20041225

Re: PHP Fileinfo

Posted: Sat Feb 19, 2011 9:40 am
by scott
oh you know what, I'll bet that linked against 5.3

Re: PHP Fileinfo

Posted: Sat Feb 19, 2011 2:17 pm
by breun
According to http://www.php.net/manual/en/fileinfo.installation.php Fileinfo is enabled by default as of PHP 5.3.0. It needs to be build as a separate module for lower versions though. Can you do a rebuild against 5.2?

Re: PHP Fileinfo

Posted: Wed Feb 23, 2011 3:29 pm
by breun
Anything I can do to help or should I just go the 'pecl install Fileinfo' route, however much I hate that?

Re: PHP Fileinfo

Posted: Tue Apr 23, 2013 1:18 pm
by esbon
Hi, I decided to ask a question here because is somewhat related.
I just upgraded to PHP 5.3 and everything went well expect I need php-pecl-fileinfo installed. When I tried to install php-pecl-fileinfo-1.0.4-2.el5.rf.i386, I get the following message:
file /usr/lib/php/modules/fileinfo.so from install of php-pecl-fileinfo-1.0.4-2.el5.rf.i386 conflicts with file from package php-common-5.3.23-16.el5.art.i386
Can someone please help me get this installed?

Re: PHP Fileinfo

Posted: Tue Apr 23, 2013 3:29 pm
by faris
I don't know for sure, but I think the thread was basically saying that the fileinfo module is now a standard part of php (from 5.3). The error you are experiencing seems to confirm this - as in fileinfo.so is already in place. Maybe someone else can confirm this?

Is some script or other complaining that something is missing and won't run? What does phpinfo() have to say about the module?

Re: PHP Fileinfo

Posted: Tue Apr 23, 2013 3:38 pm
by prupert
Fileinfo is part of the default PHP 5.3 installation.

See also http://www.php.net/manual/en/fileinfo.installation.php
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.

Re: PHP Fileinfo

Posted: Mon Jun 24, 2013 9:02 am
by esbon
HI it has been a while, but this may be useful. phpinfo says fileinfo is installed in the extention_dir: fileinfo.ini. however all my Drupal installs still complain about not finding fileinfo for detecting mime types.