I have been using kirby for over a year now with many project builds without issues but I have run into this error after uploading my files to cPanel how I usually would
"This page is currently offline. We are very sorry for the inconvenience and will fix it as soon as possible.
Advice for developers and administrators:
Change the PHP version to 7.3, 7.4 or 8.0 (PHP 7.4 is recommended)"
Any ideas on what this error might be or where to even start with debugging this?
I replaced the kirby folder with the kirby folder of an older version of plainkit and it works now. This is still a problem for me though as I want to use builder + editor blocks feature of 3.5.
Does anyone have any ideas what the problem is?
Very quick and dirty trick is to briefly set “debug” to true in the config.php file on the live server, which would render full error instead of the nondescript “error”
Thanks for your reply! My config currently has debug set to true and no difference - debug works locally but not here
The problem is the PHP version on the server. As the error message says, you need PHP 7.3+. Please check which version is active on your server.
Hi there, @sashagirl! As @texnixe pointed out, the problem seems to be the PHP version your server is running. The good news is, that if your hosting provider uses cPanel, you are likely to have multiple versions of PHP installed on the server, and you should be able to change the version yourself. Try this:
- login into your cPanel
- in the cPanel dashboard, go to the ‘Software’ tab/section
- In the ‘Software’ section, click on the ‘PHP’ or ‘Select PHP Version’ icon - the title will depend on which version of cPanel you’re running
- You will be taken to the ‘PHP Selector’ page, where you will see a drop-down menu allowing you to select the PHP version you want.
Note that some cPanel versions allow you to select different versions of PHP for different sites/domains. so make sure that the version you choose is being used on the Kirby site in question.
PHP is a rapidly-changing language. The newer versions of PHP are faster and more secure than the older ones, so you should always try to run on the most recent version you can. Unfortunately, not everybody updates their sites - or their code - as regularly as they should, so in order to stay ‘compatible’ with old sites (and old software) many hosting companies install older versions of PHP, and set the servers up to run these older versions by default…