Grav: Fatal error after update

Created on 17 Apr 2019  路  6Comments  路  Source: getgrav/grav

Fatal error: Uncaught RuntimeException: Failed to save file /var/www/clients/client1/web59/web/grav/cache/compiled/blueprints/master-example.com.php in /var/www/clients/client1/web59/web/grav/vendor/rockettheme/toolbox/File/src/File.php:351 Stack trace: #0 /var/www/clients/client1/web59/web/grav/vendor/rockettheme/toolbox/File/src/PhpFile.php(31): RocketTheme\Toolbox\File\File->save(Array) #1 /var/www/clients/client1/web59/web/grav/system/src/Grav/Common/Config/CompiledBase.php(252): RocketTheme\Toolbox\File\PhpFile->save(Array) #2 /var/www/clients/client1/web59/web/grav/system/src/Grav/Common/Config/CompiledBase.php(117): Grav\Common\Config\CompiledBase->saveCompiledFile('/var/www/client...') #3 /var/www/clients/client1/web59/web/grav/system/src/Grav/Common/Service/ConfigServiceProvider.php(77): Grav\Common\Config\CompiledBase->load() #4 /var/www/clients/client1/web59/web/grav/system/src/Grav/Common/Service/ConfigServiceProvider.php(36): Grav\Common\Service\ConfigServiceProvider::blueprints(Object(Grav\Common\Grav)) #5 in /var/www/clients/client1/web59/web/grav/vendor/rockettheme/toolbox/File/src/File.php on line 351

I had my website up and running perfectly, yesterday I updated Grav and all plugins via Admin. And now I see this error above.

I've tried what's suggested on here https://learn.getgrav.org/16/troubleshooting/permissions
still nothing, except I'm now not able to edit files thru FTP.

Thing is everything was running smoothly until the last update.

The only thing I remember doing other than the update, was adding the suggested line in the admin section to CRONTAB... (I don't remember in which section it was suggested)

question

Most helpful comment

I got the same error after a update, then I fixed it by reset permissions:

# cd /var/www/html/cache
# chown www-data:www-data -R .

All 6 comments

Does look like a permission issue, something wrong with cache/ folder that webserver is now not able to write to.

I got the same error after a update, then I fixed it by reset permissions:

# cd /var/www/html/cache
# chown www-data:www-data -R .

Have you moved the site between servers? As this one does not look like a bug but issue after copying dev site over into your server (bad permissions).

I'm using docker-grav and I ran gpm update as root.

You should run CLI commands as the same user your web server is using (example is from Ubuntu):

sudo -u www-data bin/gpm update

Yes. And for docker-grav:

docker exec -u www-data -w /var/www/html grav bin/gpm update
Was this page helpful?
0 / 5 - 0 ratings

Related issues

mlueck88 picture mlueck88  路  18Comments

marktaylor46 picture marktaylor46  路  26Comments

ulilu picture ulilu  路  29Comments

tmos picture tmos  路  21Comments

lazzich picture lazzich  路  19Comments