First time install issue only reder(); showing on server

New Kirby user here. Am doing a fresh install on a server with apache2. Having followed all the installation steps am getting an all white page except top right it says

render();

Debugging so far I have

  • ensured php module mbstring is enabled
  • Uncommented the RewriteBase / in the .htaccess file
  • installed a clean kirby3 starterkit instead of my site
  • checked php version is 8.0
  • changed .htaccess to a junk file which resulted in a internal error
  • set AllowOveride All in /etc/apache2/apache2.conf
  • ensure i have run sudo a2enmod rewrite

Any tips very welcome!

Hm, in that case, PHP cannot be rendered properly. Have you made any changes to your index.php?

Thanks for your response!

The apache server is working as I am able to successfully serve a static index.html without any of the kirby files present.

For the fresh starter kit I did not make any amendments to the index.php. Would you be able to share with me an official .htaccess file? There is not one in the git repo.

Apache is working, yes, but does PHP get invoked by Apache? You can test with a file phpinfo.php and the content

<?php phpinfo(); ?>

which should display some configuration settings if PHP is working.

The .htaccess file is in the Starterkit repo or when you download it, maybe you cannot see it in your file system because files starting with a dot a by default hidden, so you have to make these files visible.

But a missing .htaccess would not result in your server not processing PHP.

If your server runs a static .html file that doesn’t mean that PHP is working, you have to check that.

@Adspectus also answered while I was typing…

I appreciate both of your attention @Adspectus and @texnixe

When i make the file with the content as you suggest and then navigate to site-url.com/phpinfo.php I get a blank page. Apologies for the 101 question but is there something I need to do to “turn on php”?

I can see that when I run php -v

PHP 8.0.21 (cli) (built: Jul 13 2022 08:26:57) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.21, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.21, Copyright (c), by Zend Technologies

And when I run php -m I get a list of all modules including the dependencies needed for Kirby.

Do you have any suggestions about what I might be doing wrong?

Btw, ignore my comments about the .htaccess file as I recall I did use the default one which came with the git repo.

But that only means that PHP is installed on your machine and available on the command line. It doesn’t mean that your Apache web server is running PHP.

Are you running Apache locally? How did you install?

What’s curious is that when I put this in phpinfo.php then it renders correctly and displays “hello World”

<?php
echo '<div>hello World</div'; 
?>

I am running Apache on Digital Ocean and I followed their installation steps and ditto with php (I followed their steps with one major exception. I was not able to apt-get and found that I needed to first do these steps

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php

Any thoughts?

Ok @texnixe thanks for your steer. I can now see phpinfo.php after having installed

sudo apt install php libapache2-mod-php

Will try with starterkit now

Ok, brilliant I am now at this page at url my-site-url.com/panel/installation. So the issue I have been asking about is now resolved. tysm!

This page is currently offline due to an unexpected error. We are very sorry for the inconvenience and will fix it as soon as possible.

Advice for developers and administrators:
Enable debug mode to get further information about the error.

If you want to install the Panel on a remote server (i.e. not on localhost), you have to enable it in your config first

As for debug mode, you can enable that in your config as well