I written a plugin which doesn't work on PHP 5.3 but does work on 5.4

It doesn't seem to be even routing to the function as if I I add a die("dead") to the controller function I still just get a 500 error if using ajax or a blank page if going straight to the actions URL

The craft requirements say PHP 5.3 and above, is this not the case for plugins?


In theory, all plugins should be 5.3 compatible... but of course, it's up to the plugin developer to decide their own minimum requirements. 99% of publicly available plugins seem to be 5.3 compatible.

The biggest "gotcha" between 5.3 and 5.4 is the simplified array notation. In 5.4, you can declare arrays with simple square brackets ([]), instead of the more verbose array() syntax. That's one of the most notable changes between versions. Although, this doesn't seem to be the problem you're having. You'd at least see the plugin load, and kick up some sort of error message.

I'm guessing that you're testing the 5.3 vs 5.4 requirements on two separate servers? If so, you're probably running into an uppercase/lowercase problem. This actually has nothing to do with the version of PHP... Some servers care about casing, while others don't.

See this thread for a full explanation on casing, and why it might be causing your problem:


  • 1
    Minor note: as of 2.4.2677, Craft may require PHP 5.3.7, which officially includes a blowfish security fix, unless your *nix distribution has backported the fix to lesser PHP version. 5.3 is still a hard bottom limit, though.
    – Brad Bell
    Aug 24 '15 at 17:35
  • 1
    Turned out it was the array notation when initialising the plugin, i was declaring an empty array as [] instead of array() Aug 25 '15 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.