|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-04-08 09:37 UTC] tony2001 at phpclub dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 13:00:01 2025 UTC |
Description: ------------ i'm using the newest win32 binaries from the php.net PECL package. whenever i use extract, two file descriptors are opened, but only one gets closed by rar_close(), so it keeps one open for the archive for each time extract was called i believe... this maybe just a problem with the compile for win32, or rar_close missing something... --tacking on a feature request: i believe this extension really needs the ability to get the file with some other way than extract... such as some way to be able to directly stream the file to something else I'm using your extension to be able to download single files out of rar files i have stored, but the best way i've found to do it is extract to $tmpfile, then $tosend = file_get_contents($tmpfile); unlink($tmpfile); //start sending file So it would be really nice to be able to load the extracted file into a string or something... --side note i'll probably post my script to the php.net page about your extension, to help anyone at all interested in this extension with their code Reproduce code: --------------- $rar_file = rar_open($path.'/'.$file) or die("Can't open Rar archive"); $entry = rar_entry_get($rar_file, $fname) or die("Failed to find such entry"); $tmpfile=$path.'/tmp/file.tmp'; if ($entry->extract(false, $tmpfile)) { ///operations } rar_close($rar_file); //or examples on the extract page (which one is missing even rar_close) Expected result: ---------------- for it to open the rar file, then close all references to it, but it seems extract opens another reference which does not get closed... no matter what i do. i'm seeing the open file list with a program called TaskInfo, but any advanced task manager probably could list them for someone I don't know if there is any way to close the files by force in php because i'm fairly new to it... and don't know a way to reference that file anyways.