php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53969 Can't remove .res file after using ResourceBundle
Submitted: 2011-02-09 10:18 UTC Modified: 2012-05-24 11:53 UTC
From: jinmoku at hotmail dot com Assigned:
Status: Not a bug Package: I18N and L10N related
PHP Version: 5.3.5 OS: Windows 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
15 - 7 = ?
Subscribe to this entry?

 
 [2011-02-09 10:18 UTC] jinmoku at hotmail dot com
Description:
------------
I Can't remove .res file after using ResourceBundle, the only way to remove it, it's to stop apache.

after run this following code, try to delete the .res file

Test script:
---------------
$res = 'http://svn.php.net/repository/php/php-src/tags/php_5_3_5/ext/intl/tests/_files/resourcebundle/root.res';
$file = basename($res);

if(!file_exists($file))
{
    copy($res, basename($res));
}

$r = new ResourceBundle( 'en_US', realpath(__DIR__));
echo $r->get('teststring');

unset($r);

unlink($file);

Expected result:
----------------
Hello World!

Actual result:
--------------
Warning: unlink(root.res): Permission denied in C:\www\test\index.php on line 16

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-05-24 11:53 UTC] cataphract@php.net
-Status: Open +Status: Not a bug
 [2012-05-24 11:53 UTC] cataphract@php.net
That's just the way ICU works. The file only gets closed when the process ends, it remains cached before that.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 16:01:30 2024 UTC