A user, alefattorini, is experiencing issues with activating a plugin due to a fatal error. The error is caused by the plugin using PHP 5.4 syntax, which is not compatible with alefattorini’s PHP version, 5.3.3.
alefattorini shared the error message and the code line causing the issue. pfaffman suggested updating PHP or changing the syntax to the old version. However, alefattorini encountered another error.
simon identified the issue as the plugin creating an array with [], which is not compatible with PHP 5.3. cpradio pointed out that PHP 5.3 is End of Life (EOL) and recommended upgrading to a supported version for security patches.
simon decided to add a check for the PHP version to the plugin’s activation function, requiring a minimum of PHP 5.4.0. mpalmer noted that if the packages are provided by the OS vendor, the PHP version might still receive security updates.
simon provided a temporary solution by sharing a beta version of the plugin compatible with PHP 5.3. alefattorini confirmed that the solution worked. However, benword and simon emphasized the importance of upgrading to a supported PHP version for security reasons.
Hi folks,
I installed and used the plugin until some weeks ago when during an update it break my blog
Deactivated and de-installed it now I can’t install it anymore
you can’t just delete the one,you have to declare the array. Think that there is another one somewhere too. I did it last week, and don’t remember exactly. I think I got it to work, but can’t quite remember. I will try to check when I get to the office.
I think the only issue the plugin has with php 5.3 is that it’s creating an array with []. That can be changed. I’ll update it later today or early tomorrow.
I’m pretty sure that’s right, @simon. I had this problem last week and I think that I just changed two array declarations and that it worked after that. (OTOH, I’ve configured a whole bunch of stuff and it could be that there was something else wrong and I gave up.)
That’s definitely true. In my case, I’m working on moving off of my old Ubuntu 12.04 server. I’m sure it’s going to happen any day now.
I think the people who are saying that the plugin shouldn’t support PHP versions < 5.4.0 are right. I’ve just updated the plugin and added a check for the PHP version to the plugin’s activation function. Attempts to activate the plugin with an unsupported PHP version will be halted.
I’ve also added a couple of notes to the plugin’s readme to say that it requires php >=5.4.0.
@alefattorini if you are unable to update your PHP version and need a hand getting the plugin running on php-5.3.3, get in touch with me.
Assuming that the packages being used are those provided by the OS vendor, that version of PHP will get security updates, based on backported patches of security vulnerabilities provided for later releases.
Note: this repo was created to help people with existing wp-discourse setups that broke when updating from a previous version of the plugin. It won’t be receiving any updates!
If your WordPress installation is using a php version of less than 5.4, contact your hosting provider to see what can be done about upgrading the version.