2

My system.log file reads the below set of 9 items on repeat and just constantly fills up to a gig or more but I can't understand why it thinks these things are installed when they aren't. How do I deal with Varien/Autoload.php so it will stop all this?

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(ReallySimpleCaptcha.php): failed to open stream: No such file or directory  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(): Failed opening 'ReallySimpleCaptcha.php' for inclusion (include_path='/home/fantomwo/public_html/store/app/code/local:/home/fantomwo/public_html/store/app/code/community:/home/fantomwo/public_html/store/app/code/core:/home/fantomwo/public_html/store/lib:.:/usr/lib/php:/usr/local/lib/php')  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(WPSEO/Frontend.php): failed to open stream: No such file or directory  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(): Failed opening 'WPSEO/Frontend.php' for inclusion (include_path='/home/fantomwo/public_html/store/app/code/local:/home/fantomwo/public_html/store/app/code/community:/home/fantomwo/public_html/store/app/code/core:/home/fantomwo/public_html/store/lib:.:/usr/lib/php:/usr/local/lib/php')  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(All/In/One/SEO/Pack.php): failed to open stream: No such file or directory  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(): Failed opening 'All/In/One/SEO/Pack.php' for inclusion (include_path='/home/fantomwo/public_html/store/app/code/local:/home/fantomwo/public_html/store/app/code/community:/home/fantomwo/public_html/store/app/code/core:/home/fantomwo/public_html/store/lib:.:/usr/lib/php:/usr/local/lib/php')  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(Woocommerce.php): failed to open stream: No such file or directory  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Warning: include(): Failed opening 'Woocommerce.php' for inclusion (include_path='/home/fantomwo/public_html/store/app/code/local:/home/fantomwo/public_html/store/app/code/community:/home/fantomwo/public_html/store/app/code/core:/home/fantomwo/public_html/store/lib:.:/usr/lib/php:/usr/local/lib/php')  in /home/fantomwo/public_html/store/lib/Varien/Autoload.php on line 94

2015-06-25T14:35:45+00:00 ERR (3): Strict Notice: Static function Minify_Inline::minify() should not be abstract  in /home/fantomwo/public_html/wp-content/plugins/w3-total-cache/lib/Minify/Minify/Inline.php on line 8
  • It appears to be looking for files which are linked with a WordPress installation, are you using a WordPress integration like the one by Fishpig? – performadigital Jun 25 '15 at 14:55
  • Nope. There's a magento install and a wordpress install completely separate of each other and no plugins connecting the two. Which is why I don't understand! – new2programming Jun 25 '15 at 14:58
  • Is the WordPress installation in the same directory or in a subdirectory of WordPress (or vice-versa)? – performadigital Jun 25 '15 at 15:03
  • wordpress is public_html store is publich_html/store – new2programming Jun 25 '15 at 15:04
1

The simplest solution would be to move your Magento install from that subdirectory into a subdomain. So you would then have store.yourdomain.com.

A WordPress plugin appears to be triggering the Mage Autoload function. Alternatively you could disable your WordPress plugins until the errors stop and then you will find the culprit.

It seems likely a caching/minifying plugin may do this if that helps.

|improve this answer|||||
  • Yeah we have a subdomain setup and all that. Just a lot of structure to move. – new2programming Jun 25 '15 at 15:16
  • Granted it's not an ideal solution but by simply using commands at SSH level you could move the entire Magento install in seconds and redirect the subdomain to use its own structure entirely. – performadigital Jun 25 '15 at 15:18
3

What Varien_Autoload tries is to find files for the following classes:

ReallySimpleCaptcha
WPSEO_Frontend
All_In_One_SEO_Pack
Woocommerce

Search your code base for these to find out where they are referenced. To me it looks like these are classes from Wordpress plugins. The last error also proves that you included Wordpress code - maybe from the Fishpig Wordpress integration.

A likely reason for these messages is that some wordpress plugin uses if (class_exists('one of those class names')) to find out if other plugins are installed. But class_exists triggers the autoloader and while the Wordpress autoloader doesn't care if it doesn't find the class, the Magento autoloader just includes the file name where it thinks the class should be without checking if it really exists (which is stupid and I consider it a bug in Magento).

That's why you never should use class_exists in Magento.

If you can't fix the problem within Wordpress, you could patch Varien_Autoload:

  • copy the file to app/code/local/Varien/Autoload.php
  • add the following lines

    if (stream_resolve_include_path($classFile) === false) {
        return false;
    }
    

    before

    return include $classFile;
    
|improve this answer|||||
  • Yeah I'm just going to patch it. I don't understand why it's going through and just pulling stuff out of my wordpress install when there's no reason. Even after the patch it's still doing things like 2015-06-25T15:10:04+00:00 ERR (3): Notice: Undefined index: today_view in /home/fantomwo/public_html/wp-content/plugins/mechanic-visitor-counter/wp-statsmechanic.php on line 120 – new2programming Jun 25 '15 at 15:11
  • Since you installed Magento in a subdirectory below Wordpress, I assume that requests get routed through the index.php of Wordpress and then back to Magento because both .htaccess files apply. The cleanest solution would be to install Wordpress and Magento in separate directories. Alternatively you could change the Wordpress .htaccess to not apply any rewrite rules for the store subdirectory – Fabian Schmengler Jun 25 '15 at 15:16
  • The patch solution here would also mean that Magento error logging was no longer able to properly log include() errors though surely? So you may as well just disable error logging all together which doesn't seem a viable option. – performadigital Jun 25 '15 at 15:20
  • I actually just started disabling wordpress plugins and was able to stop it for now. – new2programming Jun 25 '15 at 15:22
  • @performadigital No, that's not the case. Usually you get two errors "include failed" and "class not found". The "class not found" error remains. In cases like here, where there is only a "include failed" error, it comes from a class_exists check and should not have triggered an error in the first place – Fabian Schmengler Jun 25 '15 at 15:22
1

Quick fix is to add some dummy files in the app/code/community folder eg 'ReallySimpleCaptcha.php' That worked for me, just make sure that the start with <?php

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.