php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57077 FILEINFO_COMPRESS leaves pipes opened
Submitted: 2006-06-11 17:33 UTC Modified: 2006-11-07 16:23 UTC
From: www at jap dot hu Assigned:
Status: Not a bug Package: Fileinfo (PECL)
PHP Version: 5.1.2 OS: Fedora Core 5
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: www at jap dot hu
New email:
PHP Version: OS:

 

 [2006-06-11 17:33 UTC] www at jap dot hu
Description:
------------
Using the FILEINFO_COMPRESS option, file descriptors are left open after finfo_file() is called. Repeatedly calling the function results in running out of free descriptors.


Reproduce code:
---------------
#!/usr/bin/php
<?php
dl('fileinfo.so');

$finfo = finfo_open(FILEINFO_COMPRESS);
foreach (glob("*.zip") as $filename) {
   echo finfo_file($finfo, $filename) . "\n";
}
finfo_close($finfo);


Actual result:
--------------
ls -l /proc/3437/fd/

total 48
lrwx------ 1 jap jap 64 Jun 11 23:24 0 -> /dev/pts/2
lrwx------ 1 jap jap 64 Jun 11 23:24 1 -> /dev/pts/2
lr-x------ 1 jap jap 64 Jun 11 23:24 10 -> pipe:[754125]
lr-x------ 1 jap jap 64 Jun 11 23:24 11 -> pipe:[754127]
lr-x------ 1 jap jap 64 Jun 11 23:24 12 -> pipe:[754129]
lr-x------ 1 jap jap 64 Jun 11 23:24 13 -> pipe:[754131]
lr-x------ 1 jap jap 64 Jun 11 23:24 14 -> pipe:[754133]
lr-x------ 1 jap jap 64 Jun 11 23:24 15 -> pipe:[754135]
lr-x------ 1 jap jap 64 Jun 11 23:24 16 -> pipe:[754137]
lr-x------ 1 jap jap 64 Jun 11 23:24 17 -> pipe:[754139]
lr-x------ 1 jap jap 64 Jun 11 23:24 18 -> pipe:[754141]
lr-x------ 1 jap jap 64 Jun 11 23:24 19 -> pipe:[754143]
lrwx------ 1 jap jap 64 Jun 11 23:24 2 -> /dev/pts/2
lr-x------ 1 jap jap 64 Jun 11 23:24 20 -> pipe:[754145]
lr-x------ 1 jap jap 64 Jun 11 23:24 21 -> pipe:[754147]
lr-x------ 1 jap jap 64 Jun 11 23:24 22 -> pipe:[754149]
lr-x------ 1 jap jap 64 Jun 11 23:24 23 -> pipe:[754151]
lr-x------ 1 jap jap 64 Jun 11 23:24 24 -> pipe:[754153]
lr-x------ 1 jap jap 64 Jun 11 23:24 25 -> pipe:[754155]
lr-x------ 1 jap jap 64 Jun 11 23:24 26 -> pipe:[754157]
lr-x------ 1 jap jap 64 Jun 11 23:24 27 -> pipe:[754159]
lr-x------ 1 jap jap 64 Jun 11 23:24 28 -> pipe:[754161]
lr-x------ 1 jap jap 64 Jun 11 23:24 29 -> pipe:[754163]
lr-x------ 1 jap jap 64 Jun 11 23:24 30 -> pipe:[754165]
lr-x------ 1 jap jap 64 Jun 11 23:24 31 -> pipe:[754167]
lr-x------ 1 jap jap 64 Jun 11 23:24 32 -> pipe:[754169]
lr-x------ 1 jap jap 64 Jun 11 23:24 33 -> pipe:[754171]
lr-x------ 1 jap jap 64 Jun 11 23:24 34 -> pipe:[754173]
lr-x------ 1 jap jap 64 Jun 11 23:24 35 -> pipe:[754175]
lr-x------ 1 jap jap 64 Jun 11 23:24 36 -> pipe:[754177]
lr-x------ 1 jap jap 64 Jun 11 23:24 37 -> pipe:[754179]
lr-x------ 1 jap jap 64 Jun 11 23:24 38 -> pipe:[754181]
lr-x------ 1 jap jap 64 Jun 11 23:24 39 -> pipe:[754183]
lr-x------ 1 jap jap 64 Jun 11 23:24 4 -> pipe:[754105]
lr-x------ 1 jap jap 64 Jun 11 23:24 40 -> pipe:[754185]
lr-x------ 1 jap jap 64 Jun 11 23:24 41 -> pipe:[754187]
lr-x------ 1 jap jap 64 Jun 11 23:24 42 -> pipe:[754189]
lr-x------ 1 jap jap 64 Jun 11 23:24 43 -> pipe:[754191]
lr-x------ 1 jap jap 64 Jun 11 23:24 44 -> pipe:[754193]
lr-x------ 1 jap jap 64 Jun 11 23:24 45 -> pipe:[754195]
lr-x------ 1 jap jap 64 Jun 11 23:24 46 -> pipe:[754197]
lr-x------ 1 jap jap 64 Jun 11 23:24 47 -> pipe:[754199]
lr-x------ 1 jap jap 64 Jun 11 23:24 48 -> pipe:[754245]
lr-x------ 1 jap jap 64 Jun 11 23:24 5 -> pipe:[754107]
lr-x------ 1 jap jap 64 Jun 11 23:24 6 -> pipe:[754109]
lr-x------ 1 jap jap 64 Jun 11 23:24 7 -> pipe:[754111]
lr-x------ 1 jap jap 64 Jun 11 23:24 8 -> pipe:[754113]
lr-x------ 1 jap jap 64 Jun 11 23:24 9 -> pipe:[754115]


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-11-07 16:23 UTC] ilia at prohost dot org
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit http://pecl.php.net/support/ as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

fileinfo library issue, try upgrading your fileinfo library.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 05:01:28 2025 UTC