PHP 5.3 is the version where the __DIR__ magic constant was introduced. The comet-cache.php file, which is the very first thing loaded when you install Comet Cache, loads the plugin.php, but it does so using a magic constant to figure out the full path to that file:
require_once __DIR__.'/plugin.php';
While Comet Cache requires PHP 5.4+ and there's a version check that prevents Comet Cache from crashing when you're running something older than PHP 5.4, that version check happens inside plugin.php, which is too late to catch the fact that the __DIR__ magic constant might cause a fatal error if you try installing on something older than PHP 5.3.
A review of plugin.php reveals also reveals that it would cause fatal errors on a site running PHP < 5.3, as there are many uses of __DIR__ in there.
I suggest that we make comet-cache.php and plugin.php as backwards compatible as possible. It would be a lot more desirable to show a proper "Requires PHP 5.4+" message than to generate a fatal error. Any uses of __DIR__ can be replaced with dirname(__FILE__), which should work back to PHP 5.0.
Reported here: https://wordpress.org/support/topic/error-when-enabling-plugin-1?replies=5#post-8501791
PHP 5.3 is the version where the
__DIR__magic constant was introduced. Thecomet-cache.phpfile, which is the very first thing loaded when you install Comet Cache, loads theplugin.php, but it does so using a magic constant to figure out the full path to that file:While Comet Cache requires PHP 5.4+ and there's a version check that prevents Comet Cache from crashing when you're running something older than PHP 5.4, that version check happens inside
plugin.php, which is too late to catch the fact that the__DIR__magic constant might cause a fatal error if you try installing on something older than PHP 5.3.A review of
plugin.phpreveals also reveals that it would cause fatal errors on a site running PHP < 5.3, as there are many uses of__DIR__in there.I suggest that we make
comet-cache.phpandplugin.phpas backwards compatible as possible. It would be a lot more desirable to show a proper "Requires PHP 5.4+" message than to generate a fatal error. Any uses of__DIR__can be replaced withdirname(__FILE__), which should work back to PHP 5.0.Reported here: https://wordpress.org/support/topic/error-when-enabling-plugin-1?replies=5#post-8501791