First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 120460
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: PHP Bugs <php-bugs@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Jakub Moc (RETIRED) <jakub@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 120460 depends on: Show dependency tree
Bug 120460 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-01-26 13:57 0000
Please, test and keyword dev-php{4,5}/pecl-fileinfo-1.0.3 stable; it's
replacing buggy and deprecated built-in --with-mime-magic functions, that are
no longer available in dev-lang/php ebuilds.

Thanks.

------- Comment #1 From Gustavo Zacarias (RETIRED) 2006-01-26 14:31:56 0000 -------
sparc stable.

------- Comment #2 From Simon Stelling (RETIRED) 2006-01-27 11:15:16 0000 -------
dev-php5/ stable
dev-php4/ ~amd64

------- Comment #3 From Markus Rothe 2006-01-28 11:20:28 0000 -------
stable on ppc64

------- Comment #4 From nixnut 2006-02-03 10:14:07 0000 -------
Stable on ppc

------- Comment #5 From Mark Loeser 2006-02-08 14:08:18 0000 -------
dev-php5/pecl-fileinfo is stable.

dev-php4/pecl-fileinfo does not work.

halcyon@x86-stable /home $ /usr/lib/php4/bin/php ~/fileinfo.php 
application/x-not-regular-file
application/x-not-regular-file
application/x-not-regular-file

Fatal error: Cannot instantiate non-existent class:  finfo in
/home/halcyon/fileinfo.php on line 24


Expected:
halcyon@x86-stable /home $ /usr/lib/php5/bin/php ~/fileinfo.php                
application/x-not-regular-file
application/x-not-regular-file
application/x-not-regular-file
ASCII text, with no line terminators
ASCII text, with no line terminators
ASCII text, with no line terminators


fileinfo.php can be found in the pecl-fileinfo tarball.

------- Comment #6 From Jakub Moc (RETIRED) 2006-02-08 14:21:54 0000 -------
Well, as said on IRC - the distributed examples are often broken or compatible
with a particular PHP version only. Working code:

<?php
$res = finfo_open(FILEINFO_MIME); /* return mime type ala mimetype extension */
$files = glob("*");
foreach ($files as $file) {
   echo finfo_file($res, $file) . "\n";
}
finfo_close($res);
?>

----

# /usr/lib/php4/bin/php ~/fileinfo.php
text/x-c; charset=us-ascii
application/x-shellscript
text/plain; charset=us-ascii
application/x-bzip2
application/x-shellscript
application/x-not-regular-file

# /usr/lib/php5/bin/php ~/fileinfo.php
text/x-c; charset=us-ascii
application/x-shellscript
text/plain; charset=us-ascii
application/x-empty
application/x-bzip2
application/x-shellscript
application/x-not-regular-file

------- Comment #7 From Mark Loeser 2006-02-08 14:37:39 0000 -------
Actually, someone said they didn't know why the code wouldn't work since it
wasn't PHP version dependent.  Your testcase doesn't test the OO functionality
at all.  Looking at the code quickly, I found that the OO stuff is only
generated for zend engine 2 (aka php-5 and higher).

dev-php4/pecl-fileinfo is now stable, though that behaviour sucks.

First Last Prev Next    No search results available      Search page      Enter new bug