Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running a php web application, over apache (xampp, windows7)

Recently, as far as I can see out of the blue, I encounter a strange behavior. For some reason my classes are not loaded correctly. They are either failing to load, or the wrong version of the class is loaded (taken from the wrong directory).

After some debugging, it became apparent that the include path that is used is in fact the include path from the previous request.

However, when I run get_include_path() the logged result is correct, but it's clear from the behavior that in practice it's not used, and instead used the path from the previous request.

Now, after lot of trial and error, I discovered also the following: * It happens only locally on my environment * When I delete the code, and recreate it (take from the repository) the problem continues * Restarting apach, and my pc doesn't help either * When I change the domain by means of apache vhost, the problem continues * When I move the very same code, to a directory with a different name, the problem disappears! * Aha, just tried something else: disabling apc helped!

So, even though I have a workaround for now (2 of them actually), I definitely want to understand what's going on. I do want to be able to use apc

You inputs and ideas are very welcome

Thanks

Gidi

share|improve this question
    
"include path that is used....from the previous request" - it strikes me that constantly changing your include path is a very messy approach - particularly if you're not explicitly setting your include_path in every script –  symcbean Apr 7 '11 at 9:20
    
My framework (Yii) uses this extensively. Don't see a reason why it should be a problem, and anyway definitely what happens to me is a bug and not a plausible behavior. –  shealtiel Apr 7 '11 at 21:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.