WordPress.org

Forums

Related Posts for WordPress
[Plugin: Microkid's Related Posts] Errors - function.require (8 posts)

  1. mrarrow
    Member
    Posted 4 years ago #

    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

    http://wordpress.org/extend/plugins/microkids-related-posts/

  2. boatgalley
    Member
    Posted 3 years ago #

    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 . . .

  3. pxlar8
    Member
    Posted 3 years ago #

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

  4. mrarrow
    Member
    Posted 3 years ago #

    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.

  5. boatgalley
    Member
    Posted 3 years ago #

    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.

  6. pxlar8
    Member
    Posted 3 years ago #

    Thanks. Will check it out.

  7. iceflatline
    Member
    Posted 3 years ago #

    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.

  8. microkid
    Member
    Plugin Author

    Posted 3 years ago #

    Hi,

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Related Posts for WordPress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic