The site was working fine but then a few days ago it wasn’t. I think my shared host upgraded to PHP 7.
At first the whole page was broken. I then search through all files replacing <? with <?php and <?= with <?php echo After that the basic template of each page worked. However, the content of the page don’t seem to get parsed. They appear exactly how they are in their source text file or editor. Without the new line.
Maybe if I take this chance to upgrade my Kirby… Do I need to buy another license if I want to give 3 a spin? How easy is it to convert the content over?
Or maybe a newer build of 2.x
When creating this content tho I really was wishing for a set-it-and-forget sort of approach
I think I will try to update newer 2.x first in case it may just work. I assume the plain-kit on the main page is now Kirby 3? Is the 2.x still available, can anyone point me to it please?
Looks like my host is now on PHP 7.4 so that should be OK for Kirby 3 if I really need to.
TBH, I doubt the problem is in the PHP version as the core team confirmed PHP 7.4 compatibility for Kirby 2… -> try upgrading it to the latest version before everything else.
When creating this content tho I really was wishing for a set-it-and-forget sort of approach
This approach is only reasonable when you are in total control of your environment, but:
I think my shared host upgraded to PHP 7
you are not - and to be sure if your shared host did change something you should try to figure out, i.e. the PHP version. Place a file called somefile.php somewhere in your web accessible path with the content
<?php phpinfo(); ?>
an open it in your browser and it will give you much important information which could help to track down the problem.
AFAIK, the most recent version of Kirby 2 is 2.5.13, so you are not far away, but if you like, you could upgrade it just by replacing your /kirby folder with that of the plainkit, but first check if your /kirby folder is unchanged from that from of the original 2.5.12. (but tbh I do not think this is a problem related to the minor difference in Kirby version given your description above).
If you need the Panel, then yes, you have to update, the version numbers always have to be in sync. If you don’t need the Panel, you don’t need the Panel folder at all.
I think you are on a good path. Compare the _phpver.php call from your main domain and your subdomain. The subdomain is using a complete different PHP version…
At first glance, except from the short_open_tag I did not see anything, but it would be better if one of the more deeply involved supporters here will have a look into it.
But, maybe a workaround: If you are able to run a subdomain on an old PHP version, you might be able to configure this for your main domain as well. This might give you the time to investigate while your site is running well. And then you can go the other way round and enable PHP 7.4 for your subdomain and test.
N.B.: Do not forget to remove the _phpver.php when you finished…