|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57293 rar_list invalidates rar resource
Submitted: 2006-10-12 11:52 UTC Modified: 2006-10-12 14:16 UTC
From: kleiner+pecl at gmail dot com Assigned:
Status: Closed Package: rar (PECL)
PHP Version: 5.1.6 OS: Debian Linux 2.4.27-1-6
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: kleiner+pecl at gmail dot com
New email:
PHP Version: OS:


 [2006-10-12 11:52 UTC] kleiner+pecl at gmail dot com
Package version: 0.3.1

Calling rar_list() via another function causes the resource handle to become invalid.

Reproduce code:
function do_rar($ra)
  $entries = rar_list($ra);

$filename = "tmp/amin.rar";
$ra = rar_open($filename);
$entries = rar_list($ra);

Expected result:
I expect no errors to occur.

Actual result:
Upon calling rar_close() I get the warning "cannot find Rar file resource". If I comment out the line where I call do_rar(), however, the error disappears. 

It looks as if calling rar_list() indirectly via do_rar() causes the resource handle to become invalid, while calling rar_list() directly leaves the handle intact. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-12 12:08 UTC] tony2001 at phpclub dot net
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Good catch, thanks.
 [2006-10-12 13:30 UTC] kleiner+pecl at gmail dot com
I checked out the new version from CVS. However, after compiling/installing and restarting Apache, I get the following:

[Thu Oct 12 19:26:14 2006] [notice] seg fault or similar nasty error detected in the parent process

(Running Apache 2.0.55)
 [2006-10-12 13:41 UTC] tony2001 at phpclub dot net
Can't reproduce.
Please provide a backtrace.
 [2006-10-12 14:16 UTC] kleiner+pecl at gmail dot com
Can't reproduce it either anymore. Works fine now. Thanks!
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 19:01:28 2024 UTC