1

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?

Mark Gifford
  • 157
  • 8

1 Answers1

2

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:

https://craftcms.stackexchange.com/a/1537/45

Lindsey D
  • 23,974
  • 5
  • 53
  • 110