Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error after update #2462

Closed
thagxt opened this issue Apr 17, 2019 · 7 comments
Closed

Fatal error after update #2462

thagxt opened this issue Apr 17, 2019 · 7 comments
Labels

Comments

@thagxt
Copy link

thagxt commented Apr 17, 2019

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)

@rhukster
Copy link
Member

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

@10-5
Copy link

10-5 commented Aug 16, 2019

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 .

@mahagr
Copy link
Member

mahagr commented Aug 16, 2019

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).

@10-5
Copy link

10-5 commented Aug 16, 2019

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

@mahagr
Copy link
Member

mahagr commented Aug 16, 2019

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

@10-5
Copy link

10-5 commented Aug 16, 2019

Yes. And for docker-grav:

docker exec -u www-data -w /var/www/html grav bin/gpm update

@Piterden
Copy link
Contributor

chown www-data:www-data -R .

chown -R www-data: . should be enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants