(* Well, everything sensible that I can THINK of! ;) )
I've been beating my face against a 403 forbidden error for a couple of days now. The server guys have looked at 'everything' and reckon it's a code problem.
I've now pared this down to the absolute bare bones and eliminated all that I can think of that might cause this. I have two debug files files.
[debug.php, contains ONLY]
<form id = "submitorder" name = "submitorder" action="debug1.php" method="POST">
<input type = "text" value = "hello world" name = "helloworld"/>
<input type="submit" value="Proceed to Payment." />
</form>
[debug1.php, contains ONLY]
<?php
echo $_POST['helloworld']
?>
I then put the same files into the root of the site and in the plugin directory. The permissions for the directories and files are okay. (755)
If I go to: http://www.clinicalpocketreference.com/wp-content/plugins/owh_storefront/debug.php it fails if I go to http://www.clinicalpocketreference.com/debug.php it works.
I have emptied .htaccess in case there was anything funny that WordPress was doing, and php.ini only contains errors = on
Occam's razor suggests that in the absence of anything funky in the code and the same code working in different folders that this can only be a server behavior.
This problem spontaneously started to happen on a site that was running without problems for over a year. WordPress and all plugins are up to date.
===edit=== The server guys are adamant that it's not a server issue, so I tried some more tests.
I tried making a folder with the same path on another WP site and copying just those two debug files and it works there.
I have since tried putting the two files into a plugin folder called debug (so there are no other files to interfere) and it fails.
I then tried putting them into each folder back along the path all the way to public_html
/public_html/wp-content/plugins
/public_html/wp-content
and these all fail apart from the ones in the root.
I then tried creating:
/public_html/debug
and the files WORK in there. The problem seems to happen whenever the code runs in a folder under wp-content. As I have a BLANK .htaccess and as I'm also just executing the debug.php file, there really isn't any other code that's running that can interfere with this. Wordpress is simply out of the picture here. All the permissions for those folders are 755
The plugin is one we developed here by the way... and of course just putting the two files into the /public_html/wp-content/plugins/debug folder eliminates any coding issues with the rest of the plugin.
There are also no .htaccess files in any of the folders along the path to the debug code.
this seems to be an issue with broken files, most probably the website got hacked. If needed I can scan all your files to check if it was hacked (free of charge)