i’m having a similar problem i believe.
if i go in and change all of the requires and includes in your plugin to require_once(dirname(__FILE__).’/lib/file.php’);
then it works. the problem is there are about 150 of them.
The result of getcwd looks like it’s in / or /wp-admin and as a result the include fails.
It does not appear to be including the file’s directory in the search path for this particular case (but i’ve verified that’s working in separate scripts).
All relative paths such as require(‘lib/foo.php’) fail with a standard php “can’t open stream” error.
It appears to be some really really weird symlink, php, apache, wordpress thing. I can’t trigger it except in wordpress plugins that do relative includes. Drupal, magento, and regular php just seem to work no problem.
So, if you have any idea what could be wrong with my setup that targets only wordpress plugins i’m all ears. Otherwise i think you should probably make it a practice to use absolute paths in your includes. I think wordpress best practices say you should and my hunch is they’ve made changes that are making this more necessary.
(I’d love love love to figure out what’s stopping relative includes in the wordpress plugin framework though. Five hours and no progress means i wasn’t being sarcastic when i asked if you had any ideas why this would be failing)