Search code examples
phpdebuggingversion

software not working after change of php version


I have a commercial membership site php program on the server, but after the server upgrade it no longer works. The provider has ceased to operate so there is no support. I am using php 7.0.15, but the server wants me to upgrade to a more recent version, 7.4. This breaks the program /all I get is a blank screen) My level of PHP does not allow me to debug such a complicated program. My question is: is there any way of instructing php to only use the older version? I imagine that this would have to be done in the php.ini file on the server? I would like to upgrade to php 7.4 on the server, but have this software run in php 7.0. Is this possible?


Solution

  • The simple answer is No - PHP does not offer any options to emulate the behaviour of previous versions.

    Partly because features are sometimes removed because they prevented changes in the engine, or would need a lot of work to operate with them; partly just because there is only a limited amount of resources available to work on the core of PHP, and maintaining multiple versions of each feature to enable such compatibility would take effort away from improving the current version.

    Your short-term option is to find a way to run an actual copy of PHP 7.0 on the server, or a different server that will allow you to run it. You may need to pay someone who provides unofficial long-term support for old versions, since the last official security patch for that version was over 3 years ago. Even PHP 7.4 will only receive official security patches until the end of this year.

    In the long term, your only options are to hire someone to update the application to run on a modern version of PHP, or to migrate to a different application which still has a vendor supporting it.