Grav Skeleton Blog empty page on apache

Hey guys. I love the look of grav but I cannot figure out how to make it work on apache. I set the permissions to 777 (chmod 777 /var/www/blog) but still a blank page. Any suggestions?

A blank white page almost always means a PHP error. You should look at your php error logs or turn on displaying of PHP errors. This will tell you what the issue is and get you on your way to resolving the problem.

Okay. I am not exactly experienced at this, but how do I view php logs :o

It sort of depends on your system. Perhaps these pages will help:

None of that makes sense to me. I am actually using a Raspberry Pi, running Raspbian (debian), also I was using dropplets before and it worked fine, except a few things like it couldn’t save fully.

If your running PHP, you usually have a php.ini file that controls all aspects of PHP’s configuration. Not sure of the location in Raspbian, but an easy way to tell is to create a simple php file called info.php:

<? phpinfo();

Then point your browser at this file, it will give you all kinds of information including the location of the php.ini file.

Funnily enough, the above info.php file contents render as blank for me, but the following works:

— php

<?php phpinfo(); ?>

I guess the errors causing the blank page syndrome are myriad, but fwiw setting permissions like below fixed Grav for me (I was getting error 500):

sudo chown -R www-data:www-data /var/www
sudo chmod -R 775 /var/www

If the above phpinfo() is blank, you might be having the PHP.ini setting short_open_tag turned off?

That’s most likely it :slight_smile: Thanks! I did think the difference seemed a tad big to be just different PHP versions.

Best,
PHP Noob

@janne not sure what platform you are doing this on, but I strongly recommend PHP7 it’s approx 2X faster than PHP 5.X. Also you will have less permissions problems if you can run the webserver under the same account that owns the page files. That way you can edit the page files as you need and never have to worry about the web server creating cache files or configs that have different perms.

We have some extensive writeups in the docs about different hosting platforms that outline some of these techniques.

Nice, thanks! I’m currently doing some testing on Digital Ocean and simply used one of their ready-made droplet images. I need to run Wordpress on the same droplet so I need to make sure that works as well, whatever I decide to upgrade.

None of this stuff will get particularly heavily hit but 2x faster rendering obviously sounds tempting :slight_smile:

This was made for you: Digital Ocean Guide

Will work great for WordPress (or Drupal, or Joomla) too.

Actually… an even better approach that I strongly recommend is using ServerPilot.io

I blogged about this with Amazon EC2, but if you do the first steps of the DigitalOcean guide to setup an Ubuntu 14.04 base install, then pickup with the ServerPilot stuff from the blog post, it will work fine:

https://getgrav.org/blog/fast-free-grav-development

PS, this is how we run getgrav.org, only on linode. But ServerPilot gives us HTTP/2 and PHP7 without any fuss!

That’s great, I have to check all that out — thanks a lot! To be honest getting Grav to work has been the easiest & quickest part of this little project. Very designer friendly, all in all!

Next on my list will be embedding forums and commenting :slight_smile:

I have a hunch you want to embed Muut :), and it couldn’t be easier. For example this very page is simply:

- - -
title: Forum
process:
    markdown: false
- - -
<a class="muut" href="https://muut.com/i/getgrav">Grav Forum</a>
<script src="//cdn.muut.com/1/moot.min.js?nocdn"></script>

NOTE: dashes in frontmatter have spaces added so as not to confuse muut’s code blocks.

The ?nocdn is only required because we are using Grav’s CDN plugin that tries to CDNify script URLs.

Tried Serverpilot and while I’m happy to have learned how to set stuff up manually, I think I’ll go ahead and delete my old server and continue using Serverpilot from now on. Awesome! Thanks a lot for the recommendation.