Question

I have followed several articles on this, but none solve my problem. Every request on site writes the following entry to the system log.

var/log/system.log:

2013-10-09T12:53:50+00:00 ERR (3): Warning: include(File.php): failed to open stream: No such file or directory  in /var/public_html/domain.com/live/lib/Varien/Autoload.php on line 93
2013-10-09T12:53:50+00:00 ERR (3): Warning: include(): Failed opening 'File.php' for inclusion (include_path='/var/public_html/domain.com/live/app/code/local:/var/public_html/domain.com/live/app/code/community:/var/public_html/domain.com/live/app/code/core:/var/public_html/domain.com/live/lib:.:/usr/share/pear:/usr/share/php')  in /var/public_html/domain.com/live/lib/Varien/Autoload.php on line 93

I have seen and followed articles that indicate this is related to the compiler.

What I've Done So Far

I have commented the two lines out in includes/config.php.

Cleared the profiler from terminal following Mr Storm's article: Magento Compiler.

Ensured that the caches are emptied and indexing has been run several times.

Compared a vanilla copy of 1.7.0.2 CE and looked for any files that my own codebase might be missing (using WinMerge).

Disabled symlinks in admin.

Changed file permissions to several various recommendations and back again.


I've also noticed that the profiler page in admin located at Admin > System > Tools > Compilation is completely blank, apart from the nav and footer.

Any help on where to now would be very appreciated. Please ask if anything is unclear. Thanks!

Was it helpful?

Solution

the Autoload tries to require the file for a class that isn't found in the code base yet. Since it is requiring File.php it stands to reason that somewhere in the code the class File() is called which doesn't exist yet in your codebase.

If you track down the spot where that class is instantiated you will have fixed the issue.

OTHER TIPS

For follow-up, the mageDebugBacktrace() provided the following result:

[1] :
[2] :
[3] /var/public_html/domain.com/live/app/code/core/Mage/Core/Model/Cache.php:199
[4] /var/public_html/domain.com/live/app/code/core/Mage/Core/Model/Cache.php:119
[5] /var/public_html/domain.com/live/app/code/core/Mage/Core/Model/Config.php:1348
[6] /var/public_html/domain.com/live/app/Mage.php:462
[7] /var/public_html/domain.com/live/app/code/core/Mage/Core/Model/App.php:401
[8] /var/public_html/domain.com/live/app/code/core/Mage/Core/Model/App.php:295
[9] /var/public_html/domain.com/live/app/code/core/Mage/Core/Model/App.php:337
[10] /var/public_html/domain.com/live/app/Mage.php:683
[11] /var/public_html/domain.com/live/index.php:71

Looking at the Cache.php file, I can see that the 'File' part is the default backend cache type used by Magento, if none is specified. I changed my app/etc/local.xml file to use 'File', note upper case 'F':

File app/etc/local.xml:

<cache>
    <backend><![CDATA[File]]></backend>
    ...
</cache>

Hope that helps someone out.

Just encountered a weird Warning: include(somefile.php) failed in Autoload.php on line 93 after pulling work on a shared test environment and someone else enabled the cache.

Not this exact case, because it's mentioned:

Ensured that the caches are emptied and indexing has been run several times.

So, always remember to check and disable/clear the cache if working on a shared environment, before wasting hours debugging!

This error while creating an object from class like $obj = new GoogleClient(); in Magento it try to find out the class file using Autoload.php

It could be also issue with apc cache. Restart apache2 or execute apc_clear_cache(); from php

I had this same issue and turns out flushing the redis cache fix it for me.

From command line:

echo 'flushall' | redis-cli -s /path/to/sock

Heres the documentation incase you're not using a socket:

https://briansnelson.com/Install_Redis_Caching_for_Magento

Hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top