Hi Rob,
How embarrassing! I need to update the plugin so that it doesn’t do Ajax calls to the server that way. There are now more robust ways to handle this, that probably wouldn’t have given you any problem, but I wrote the plugin before they existed. I have plans to do a major update to address this and other things, but probably not until the end of the year now.
Anyway, let’s try to get you going with the current version. The wp-settings.php file is in the root folder, as you point out. Of course, getexchangerate.php has the following line:
require_once(ABSPATH . 'wp-settings.php');
However, this is redundant in most cases because the same line is now normally included in wp-config.php as well. The wp-config line will fire first and it is using require_once (so it will only load that file once, the first time it is called). That means the line in getexchangerate.php will not actually do anything.
To clear up things while we are troubleshooting, please remove that line from getexchangerate.php. I expect you will get the same error message. If you do, then we know this is coming from wp-config.php. I’m pretty confident this is the case as the error message actually tells us this – it is saying the error happens “in /var/www/booqs.net/wp-config.php on line 84”.
So please go to line 84 in wp-config and see what it says. It will probably be the same as the line I asked you to remove. It looks like it is calling wp-settings.php in the booqs.net folder (ie the level above root). So perhaps you just need to tweak the path it is using. However, it’s probably using the ABSPATH constant.
If you look higher up in wp-config, you’ll probably see something like this:
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
This is where ABSPATH is defined and it is basically saying “if it’s not already defined, then use the current directory”. The error message fits ABSPATH being set to the current directory, ie the directory that wp-config is in, which is of course wrong! So you probably need to replace
dirname(__FILE__) . '/'
with the actual path.
If I’m right, that will fix the problem! All the signs point to this being the cause, except….
If ABSPATH is set to the wrong directory, then things will be breaking all over the place, not just in LocalCurrency. This is used by many plugins and themes and most importantly, by WordPress itself.
Anyway, please have a look at wp-config and see what’s on line 84. Thanks!
Cheers,
Stephen