Hi there,
thank you for pointing this out. According to the lines of code you referenced, wp-config could be moved to the parent folder, so my code should be looking there as well:
if ( file_exists( ABSPATH . 'wp-config.php') ) {
/** The config file resides in ABSPATH */
require_once( ABSPATH . 'wp-config.php' );
} elseif ( file_exists( dirname(ABSPATH) . '/wp-config.php' ) && ! file_exists( dirname(ABSPATH) . '/wp-settings.php' ) ) {
/** The config file resides one level above ABSPATH but is not part of another install */
require_once( dirname(ABSPATH) . '/wp-config.php' );
} else {
// A config file doesn't exist
I will modify wp-slimstat-js.php to keep this exception in account.
The reason why I don’t load the ENTIRE WordPress engine to execute just a couple of queries is quite evident: performance 😉
Ciao,
Camu
PS: a vote for my plugin would be a nice way to say thank you.
Thanks for your kind attention.
Oh, and regarding the vote: been there, done that (a while ago already).
Keep up the good work!
Ciao, pixolin.
A fix has already been added to 2.8.7 🙂
Cheers,
Camu
Hi,
my config.php is pointing to the actual configuration file like so
<?php
include('/is/htdocs/w.../px7g.php');
?>
seems to create Error parsing wp-config with slimstat.
Any cure for that?
Hi Thob,
in your case you will need to point wp-slimstat-js.php
to the REAL config file, basically where the DB access params are defined. You will have to edit it every time you update WP SlimStat (I’m working on a way to avoid that, though).
Cheers,
Camu
PS: a vote for my plugin would be a nice way to say thank you.
Hmm, the file is in a parallel directory like 5 up and then into a dir that’s parallel to www. How would I write it?
Thanks
Use .. for each folder up 😉
Let’s say you have slimstat in
/home/www/wp-content/plugins/wp-slimstat
and your wp-config is in
/home/www/config/wp-config.php
Then you need to go 3 up and 1 down:
../../../config
Hopefully your file is called wp-config.php 😀
If it’s not, you will have to further edit the code of my file to make it work for you.
I will add this to the next release (only if you are willing to change your vote from 4 to 5 stars hehe… just kidding).
Cheers,
Camu
it’s named differently 😉 what else do I have to edit then?
I’m wondering why anyone would have such a non-standard environment. What are the benefits of this approach? Once I get access to the first file, I know where to find the second, no matter how you call it 🙂
Anyway, a solution to your problem will be implemented soon.
Stay tuned and thanks for your vote!
Camu
If I remember correctly it was a security advice. But you are right one leads to the other
btw: you got 5* for excellent product & support 🙂
Update: here is the post about moving the configuration file
Thank you for the reference, much appreciated. I am implementing the workaround, which basically will allow you to write the path to your wp-config in a file within your wp-content folder. WP SlimStat will search for that file, and use the path to locate your wp-config 🙂 And even if you update WP SlimStat, your file won’t be overwritten.
Cool?
Camu