[Plugin: Microkid's Related Posts] Errors – function.require
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.phpand change the wp-config.php directory location at the top of that file i.e.
../../../../wp-config.phpit 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?
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.
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.
- The topic ‘[Plugin: Microkid's Related Posts] Errors – function.require’ is closed to new replies.