robertmaefs
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress GitHub Sync] Need to change autoload.phpit’s odd, i tracked the fatal “couldn’t find required file”, changed that to the snippet i shared, and it worked. The php version was 5.2 then i upped it to 5.4 or 5.5 i can’t remember which and it didn’t fix it until i edited your plugin. It may legitimately have been a misconfiguration on the godaddy windows shared host. I was having lots of other dumb issues. Once I forcibly moved the client to linux everything worked beautifully.
Forum: Plugins
In reply to: [WordPress GitHub Sync] Need to change autoload.phpThe plugin was causing a 500 error on the server until i modified the code with the above. It appears that in this case windows was not transliterating the slashes correctly.
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)