Support » Plugin: Related Posts for WordPress » [Plugin: Microkid's Related Posts] Errors – function.require

  • Hi

    I’m running WP 3.0.5 Multisite and when I do a search in the Edit post screen, to link a post to another post, it comes up with the following three errors:

    Warning: require(../../../wp-config.php) [function.require]: failed to open stream: No such file or directory in /home/<accountname>/public_html/wp-content/plugins/microkids-related-posts/mrp-search.php on line 10
    Warning: require(../../../wp-config.php) [function.require]: failed to open stream: No such file or directory in /home/<accountname>/public_html/wp-content/plugins/microkids-related-posts/mrp-search.php on line 10
    Fatal error: require() [function.require]: Failed opening required '../../../wp-config.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/<accountname>/public_html/wp-content/plugins/microkids-related-posts/mrp-search.php on line 10

    I believe this is because I follow the WordPress Codex suggestion of moving the wp-config.php file up one level for security reasons i.e. out of public_html into the root of the account.

    When I move wp-config.php back into the root of public_html your plug in works fine. However, I’d like to keep wp-config.php in my preferred location.

    When I edit your file mrp-search.php and change the wp-config.php directory location at the top of that file i.e. ../../../../wp-config.php it clears one of the errors but not the others.

    wp-config.php or some related file must be being referenced elsewhere in your plugin but I can’t find any other instances. Any ideas?

    Many thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • I’m not doing Multi-Site but I have pretty much the same problem. Anyone with ideas?? I love the plugin, have it on 200+ posts, and really don’t want to switch to something else . . .

    Having the same issue–I’ve also moved my wp-config.php as recommended in the codex.

    As you can see, there’s been no response on my original question!

    So the solution I applied was to move wp-config.php back up into the root level and then lock that file down as best I could using .htaccess rules.

    Not ideal but nothing else worked.

    My solution was to switch to using nRelate’s Related Posts so that I could leave wp-config where I wanted it. Again, not ideal . . . but at least nRelate responds to questions and problems.

    Thanks. Will check it out.

    I have the same problem with this plugin after the wp-config.php file was moved to the web root. There is no way to effectively modify mrp-search.php because it does not have the requisite permissions to access wp-config.php at that location (nor should it).

    Perhaps if “micro kid” is paying attention to the comments here, he/she would consider rewriting the code to remove the dependency on this file? Else there is no way to use this plugin *and* improve security of the site.

    Plugin Author microkid



    I am currently working on a version that will fix this. I hope to release it before the end of the year. Sorry to keep you waiting guys.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Microkid's Related Posts] Errors – function.require’ is closed to new replies.