php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59236 cached file keeps old folder reference after renaming folder
Submitted: 2010-05-27 08:36 UTC Modified: 2016-11-18 21:53 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: rene dot ayr1 at gmail dot com Assigned:
Status: Wont fix Package: APC (PECL)
PHP Version: 5.2.13 OS: Red Hat 5.3
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 — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
9 - 5 = ?
Subscribe to this entry?

 
 [2010-05-27 08:36 UTC] rene dot ayr1 at gmail dot com
Description:
------------
cached file keeps old folder reference after renaming folder

with APC enable visiting a url
www.example.com/folder1/
renaming the folder1 to folder2
and visiting 
www.example.com/folder2/

will result in the includes to reference folder1


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-05-28 08:55 UTC] gopalv82 at yahoo dot com
Are you using apc.stat=0?

If you are and you want to rename directories, use apc.canonicalize=Off;
 [2010-05-28 09:15 UTC] rene dot ayr1 at gmail dot com
apc.stat=1 is set, I've included the rest of my config

Thanks
 
; Enable apc extension module
extension = apc.so
; Options for the apc module
apc.enabled=1
apc.shm_segments=1
apc.shm_size=512
apc.ttl=7200
apc.user_ttl=7200
apc.stat=1
;apc.num_files_hint= 4500000
apc.mmap_file_mask=/tmp/apc/apc.XXXXXX
;apc.enable_cli=1
apc.cache_by_default=1
;apc.file_update_protection=10
apc.write_lock=1
 [2010-08-20 09:19 UTC] bb_plus at hotmail dot com
I am having a problem that seems due to the same fundamental flaw.  Three Wordpress websites with the same Wordpress version installed and therefore identical file names, dates and time stamps display with web page content mixed between the sites.  For example, the home page content of the first of those sites visited after an Apache restart is also displayed at the other two websites.

Server: Windows 2000 Advanced Server (Windows NT 5.0 build 2195)

Apache: httpd-2.2.16-win32-x86-no_ssl

PHP 5.2.14-win32

APC 3.1.4

php.ini file configuration:

[PHP_APC]
extension=php_apc.dll
apc.shm_size=75
apc.num_files_hint=1100
 [2010-08-21 10:32 UTC] bb_plus at hotmail dot com
I hadn't noticed in the on-line manual that with the default setting apc.canonicalize=on relative paths are canonicalized in no-stat mode, which was causing the problem described above. It is so common to have identical files with different paths in shared hosting environments it seems it would be better to have the default setting be apc.canonicalize=off and then to instruct those with simple hosting situations who can benefit from the speed improvement provided by not checking file paths set it on, just as is the case for apc.stat relative to file modifications.
 [2016-11-18 21:53 UTC] kalle@php.net
-Status: Open +Status: Wont fix
 [2016-11-18 21:53 UTC] kalle@php.net
APC is no longer supported in favor of opcache that comes bundled with PHP, if you wish to use the user cache, then look at PECL/APCu.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 22:01:28 2024 UTC