|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2012-11-05 09:42 UTC] pajoye@php.net
-Status: Open
+Status: Feedback
[2012-11-05 09:42 UTC] pajoye@php.net
[2012-11-05 10:09 UTC] i at kochira dot com
[2012-11-05 10:29 UTC] pajoye@php.net
[2013-02-18 00:36 UTC] pecl-dev at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 02:00:01 2025 UTC |
Description: ------------ Using latest PHP available for latest Ubuntu... PHP 5.3.10-1ubuntu3.4 (APC 3.1.7) (I checked the changelogs for versions 5.3.11~18, didn't see anything related to the problem) The 'includes' files tree is like that ...includes/common/Class.inc ...includes/Client1 -> ../common ...includes/ClientN -> ../common ...includes/ClientX/Class.inc ...includes/ClientY/Class.inc As you can see, there are 3 versions of Class.inc (each having a different inode, of course). X and Y have one each, and common has also one which is used via symbolic links from clients 1..N. But the 3 versions are identical (diff common/Class.inc clientX/Class.inc => no difference, for instance). The only reason there are 3 different versions, while it's not relevant to our problem, is because sometimes I want X and Y to try a new version before uploading to 'common'. But again, the 3 versions are identical since about a week ago. (Actually all 'inc' and 'php' files are identical, to make it clear) Class.inc is a class definition (It contains only a class definition). The NO problem: When ClientX&Y 'require' 'ClientX(orY)/Class.inc' there is no problem at all. Problem: When Client1..N 'require' 'Client1..N/Class.inc' => No error, no warning in the log But the Class definition is not seen by requirer.php. Investigation: After checking the apc_cache_info(), it appears that - 'ClientX&Y/Class.inc' are in the cache - 'common/Class.inc' is not Why the 'require' for Client1..N does not make APC load the file? Why, if it can't, is there no error in the log? The only difference between ClientXY and Client1..N is the symbolic links... Notes: - There are many other files in the common and ClientX,Y directories. Only Class.inc caused a problem, for some reason (class definition by itself?). - Class.inc is not used very often. Maybe the TTL (I use defaults) is of concern? Test script: --------------- index.php (same version for all clients) <?php require CLIENT_NAME . '/Class.inc'; // define MyClass => No Error ... $x = new MyClass; /* Error: PHP message: PHP Fatal error: Class 'MyClass' not found in /.../index.php */ Expected result: ---------------- The require to make APC to load the common/Class.inc file in its cache, interpret it and make PHP aware of the class. Actual result: -------------- - require does not produce an error - MyClass is not known