New Add-on error - PHP 5.4 not compatible

Permalink
I just installed ProForms 7.6.2 and got an error. I looked up previous posts on the same error and the developer suggests upgrading to a later version of PHP (I'm still on PHP Version 5.2.17).

When I look in my Bluehost cPanel on upgrading PHP it states the following:

PHP 5.4+ Incompatible Applications Installed

Application Name Version Path
CONCRETE5 5.4.1.1 /home/engage/public_html
CONCRETE5 5.4.1.1 /home/engage/migration/files

What does this mean? If I can't upgrade then proforms will unlikely work.

For reference the error is:

Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM in /home2/engagef5/public_html/packages/proforms/models/attribute/types/associate_object/controller.php on line 128

which is: $object = $objectName::getByID($this->getValue());

Not a great start. This question is mostly about the PHP version issue.

 
JohntheFish replied on at Permalink Reply
JohntheFish
To use php5.4 you will need to upgrade your c5 installation to 5.6.+.

From c5.4.1.1 that needs to be done in stages. There are several forum threads dealing with that if you search back.

If you decide to go that route, don't forget to backup your database and all files before starting, to test at each stage and backup at each stage. You should also do a manual review of addons and themes to make sure everything you have installed is compatible with all c5 core versions through the upgrade stages.

The marketplace requirement is php 5.2, so ideally addons should not use php 5.4 without at least pre warning users. Often it happens as a minor mistake on a developer's behalf, they just didn't realise that a syntactic convenience when making a change was not backward compatible.
rusty007 replied on at Permalink Reply
Thanks. I thought I was on 5.6.3.3 but that is via the updates directory, so I guess this mean I have to update the root files to 5.6+. Just learning C5 on the run. I'll see what I can find in the way of instructions for this so I don't break a live site.
JohntheFish replied on at Permalink Reply
JohntheFish
Check the dashboard environment page. That is the definitive answer to what version the core thinks it is running.

It could be that your host originally installed at 5.4.1.1 through a 1-click install and that is what the host's control panel remembers, but you have updated to 5.6.3.3 since.

If that is the case, you should be safe to just configure the host to run php 5.4.

EDIT - make sure you can swap back to your current php version if swapping to php5.4 breaks the site.