HTTP ERROR 500 on Apache when trying to setup Grav

Attempting to install grav by uploading the latest grav core + admin (1.7.44) from Downloads | Grav CMS on FileZilla to a DigitalOcean droplet running Ubuntu 23.10 and PHP 8.2.10, and then using unzip through CLI to unzip grav-admin folder to the web root. I’ve tested PHP as suggested and it works fine. Wondering if this is a permissions issue and following this guide, Permissions | Grav Documentation but even if I use sudo chmod -R 777 on the webroot for this domain (I changed this after attempting), I just get an HTTP ERROR 500 when I try to access index.php or just /grav-admin/. When I run the command from that page to see which users Apache runs on, I get my user account as well as ‘www-data’ but I think this is normal and shouldn’t cause issues, right? In further troubleshooting on the same domain, even in grav-admin folder, a test info.php file works fine. I’m not sure what else to do as far as troubleshooting here. I added Options FollowSymLinks, AllowOverride All and Require all granted to my virtualhosts. I’ve destroyed and reimaged this droplet a few times trying to get this to work and everything seems perfectly fine with this server otherwise… I have php.ini set to error_log=syslog, but I don’t see any PHP errors at all in there. What else can I try / test for?

Does anyone have any idea on what I can troubleshoot? I’ve tried this a half dozen times now, grav just does not run. I’m considering trying with a non DigitalOcean server because I just have no idea what could be wrong here.

i dont think its the case by digitalOcean but some vpc come with a firewall by default

1 Like

Coming back to this, but it is a bare bones Apache Linux install. So using ufw for firewall, for ‘Apache Full’. Do you have more advice to troubleshoot if this is a firewall issue or not?

I’ve used grav in the past in the same way, the only difference was my version of linux, and at this point I’ve destroyed and restarted my droplet 5+ times, but I absolutely cannot get grav install script to run here… I’m at a wall

Just an update on this, I’m giving up and switching CMS’s to probably Hugo. I love and want to support Grav, I want to contribute. I’ve used Grav for a few projects and it’s the perfect lightweight CMS in my opinion. But it doesn’t work anymore on any up to date server. These forums are dead and Grav itself is rarely updated. It seems like nobody really cares about it anymore. This was such a promising CMS at one point

So did you ever contact your hosting provider and asked them to check server logs if you couldn’t find them yourself? Nobody could’ve really helped you with so little info that you’ve provided

That’s probably an overstatement, else more users would experience the same issue.

As a test, I just installed the latest Grav core v1.7.46 on a cheap hoster using PHP 8.3.6 and everything is running flawless.

I took a big long break but I still am so desperate to solve this. Here’s what I have in PHP error logs:

PHP Warning:  PHP Startup: Unable to load dynamic library 'apcu.so' (tried: /usr/lib/php/20220829/apcu.so (/usr/lib/php/20220829/apcu.so: undefined symbol: php_strlcpy), /usr/lib/php/20220829/apcu.so.so (/usr/lib/php/202208>
[Sun Aug 04 07:53:19.333679 2024] [mpm_prefork:notice] [pid 826] AH00163: Apache/2.4.57 (Ubuntu) OpenSSL/3.0.10 configured -- resuming normal operations
[Sun Aug 04 07:53:19.333709 2024] [core:notice] [pid 826] AH00094: Command line: '/usr/sbin/apache2'
[Sun Aug 04 08:17:48.440523 2024] [php:error] [pid 928] [client 104.35.38.112:35439] PHP Fatal error:  Uncaught RuntimeException: Failed to save file /var/www/html/grav-admin/user/config/security.yaml in /var/www/html/grav->
[Sun Aug 04 08:25:09.957047 2024] [php:error] [pid 929] [client 104.35.38.112:45855] PHP Fatal error:  Uncaught RuntimeException: Failed to save file /var/www/html/grav/cache/compiled/blueprints/master-137.184.189.15.php in>
[Sun Aug 04 08:26:31.187744 2024] [php:error] [pid 926] [client 104.35.38.112:38335] PHP Fatal error:  Uncaught RuntimeException: Failed to save file /var/www/html/grav/cache/compiled/blueprints/master-137.184.189.15.php in>

What could be causing this about my server? Even if I set permissions to 777 and try to install, Grav admin still never runs…

Looks like you have 2 instances of Grav. One in grav-admin and another in grav. Just delete both and try re-uploading only one. Feels like something is messed up with configs. Also you could try 755 permissions if that doesn’t work