PHP Fileinfo

Requests for RPMS, or new coding projects related to server administration, Plesk, security, or anything else you can think of.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

PHP Fileinfo

Unread post 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.
Last edited by breun on Fri Feb 18, 2011 7:02 pm, edited 1 time in total.
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: PHP Fileinfo

Unread post by scott »

No problem, should be up in the repo shortly
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: PHP Fileinfo

Unread post 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
Lemonbit Internet Dedicated Server Management
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: PHP Fileinfo

Unread post by scott »

oh you know what, I'll bet that linked against 5.3
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: PHP Fileinfo

Unread post 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?
Lemonbit Internet Dedicated Server Management
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: PHP Fileinfo

Unread post by breun »

Anything I can do to help or should I just go the 'pecl install Fileinfo' route, however much I hate that?
Lemonbit Internet Dedicated Server Management
esbon
Forum User
Forum User
Posts: 5
Joined: Sun Jun 24, 2012 10:36 pm
Location: Washington DC

Re: PHP Fileinfo

Unread post 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?
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: PHP Fileinfo

Unread post 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?
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: PHP Fileinfo

Unread post 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.
Lemonbit Internet Dedicated Server Management
esbon
Forum User
Forum User
Posts: 5
Joined: Sun Jun 24, 2012 10:36 pm
Location: Washington DC

Re: PHP Fileinfo

Unread post 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.
Post Reply