A case of strange but true tale of woe.
A few versions back I added in some functionality to my plugin, eShop, for users to view their orders. I called the file user.php. A lot of my other files have a preface of eshop_ in them. Now at the time I thought nothing of doing this, thinking the naming was suitable. Turns out it was, but caused major grief for IIS users.
Until today, when I gained access to a site using IIS. I warned the user to backup everything first in case I messed anything up and started trying to find the cause of this strange error.
The error was this:
Fatal error: Cannot redeclare add_user() (previously declared in C:\Inetpub\vhosts\site\httpdocs\blog\wordpressDEV\wp-admin\includes\user.php:23) in C:\Inetpub\vhosts\site\httpdocs\blog\wordpressDEV\wp-admin\includes\user.php on line 44
but I wasn’t included that file…
Here is the code I had:
if(is_admin())
include 'user.php';
which I assumed would include the file from the same directory. It did, unless you were on IIS. So I changed it to:
if(is_admin())
include WP_PLUGIN_DIR.'/eshop/user.php';
which I believe has finally fixed this outstanding issue.
Why does Eshop not work?
well it could for one of many reasons, but without more details I, or anyone else for that matter, cannot help you.
Please use the forums.