Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author James DiGioia

    (@jamesdigioia)

    Are you getting errors? My understanding is Windows can translate the / fine from PHP.

    Thread Starter robertmaefs

    (@robertmaefs)

    The 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.

    Plugin Author James DiGioia

    (@jamesdigioia)

    That’s not the correct path to the autoloader; does this work?

    $path = dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR .'autoload.php';

    Plugin Author James DiGioia

    (@jamesdigioia)

    Oh! That’s the path in the autoloader itself. That’s generated by Composer on deployment to the .org repository. I’m surprised that fixed anything for you, because everything I’ve read suggests this shouldn’t be an issue for PHP on Windows. What version of PHP are you running?

    Thread Starter robertmaefs

    (@robertmaefs)

    it’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.

    Plugin Author James DiGioia

    (@jamesdigioia)

    It’s likely that the issue was PHP 5.2. We got an issue on GitHub the other day about the composer autoloader being incompatible with PHP 5.2. The problem isn’t the directory slashes, it’s the use of the __DIR__ constant, which wasn’t introduced until PHP 5.3.

    The next version will use a different autoloader which will be compatible with PHP 5.2.

    Definitely forcing the client to upgrade/switch off Windows was a good choice :).

    Plugin Author James DiGioia

    (@jamesdigioia)

    Marking as resolved, let me know if you experience this issue on the latest version.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Need to change autoload.php’ is closed to new replies.