Mantis - Quercus
Viewing Issue Advanced Details
2926 major always 09-11-08 17:16 09-15-08 15:03
koreth  
ferg  
normal  
closed 3.2.1  
fixed  
none    
none 3.2.1  
0002926: Changes to .php files are ignored after first reload
One of the recent batch of changes to Quercus has made it stop noticing when I make edits to a .php file, unless that file was compiled in the current run of Resin. If I restart Resin and reload the page, it picks up my changes, and (as long as I don't reload twice in a row) I can keep editing the same file and will see the changes. It looks like once Quercus starts using the compiled version of a file, it's not checking the source .php file again.

Notes
(0003437)
koreth   
09-14-08 11:48   
I didn't get the description quite right. What actually seems to be happening is that files that get initially loaded in precompiled form (after a server restart) never get recompiled. A file that initially runs in interpreted mode (because the .php file was newer than the compiled class at server start time) can be edited and reloaded even after the server has compiled it and started using the compiled version.

So basically I have to restart the server every time I start making changes to a different file, but I can keep editing that same file without restarting even after it has been compiled.
(0003438)
koreth   
09-14-08 12:09   
The fix for bug 2217 broken this. Here's a patch that seems to work. Not sure if this is the right way to set the default value for an ini file setting, though.


--- a/modules/quercus/src/com/caucho/quercus/page/PageManager.java
+++ b/modules/quercus/src/com/caucho/quercus/page/PageManager.java
@@ -58,7 +58,7 @@ public class PageManager
   private boolean _isCompile;
   private boolean _isCompileFailover = ! Alarm.isTest();
 
- private boolean _isRequireSource;
+ private boolean _isRequireSource = true;
 
   protected LruCache<Path,QuercusProgram> _programCache
     = new LruCache<Path,QuercusProgram>(1024);
@@ -252,7 +252,7 @@ public class PageManager
 
        program = preloadProgram(path, fileName);
 
- if (program == null) {
+ if (program == null || isRequireSource()) {
          program = QuercusParser.parse(_quercus,
                                        path,
                                        _quercus.getScriptEncoding(),
(0003439)
ferg   
09-15-08 15:03   
php/2210

(the proposed change isn't actually what's needed. Quercus doesn't need to reparse the source file, it just need to check the modifications differently.)