Php 5.3 too old but I cannot change it

I am using php 5.3 and would like to move to a later version so I can continue to get updates, but when I do the I get the message “invalid directive” when I launch piwik. I cannot use any newer version because of this error message. When I change the php version back to 5.3 it works fine. Can anyone please tell me how to move to php 7.0 or 7.1 or 5.6 and eliminate this error message. Thanks.

To be exact this is exactly the message I see when changing to a newer version of php [an error occurred while processing this directive]