More of a support -> 500 error on install #1305

Closed
opened 2026-02-05 00:33:27 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @ZakShearman on GitHub (Aug 10, 2019).

Hi there, I have been trying to install the BookStack software, but I have been having an issue.

I am running NGINX, and this is my NGINX config file for the website:

server {

listen 80;
server_name wiki.zakshearman.com;
root /var/www/BookStack/public/;
index index.html index.php;

location / {
try_files $uri $uri/ /index.php?$query_string;
}

location ~ .php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

I am getting this error when running "tail -f /var/log/nginx/error.log":

PHP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.php): failed to open stream: Permission denied in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array)
#1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0)
#2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...', '<?php $__env->s...')
#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www

All help is very appreciated.

Originally created by @ZakShearman on GitHub (Aug 10, 2019). Hi there, I have been trying to install the BookStack software, but I have been having an issue. I am running NGINX, and this is my NGINX config file for the website: server { listen 80; server_name wiki.zakshearman.com; root /var/www/BookStack/public/; index index.html index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.2-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } I am getting this error when running "tail -f /var/log/nginx/error.log": PHP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.php): failed to open stream: Permission denied in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array) #1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0) #2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...', '<?php $__env->s...') #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www All help is very appreciated.
Author
Owner

@ZakShearman commented on GitHub (Aug 11, 2019):

Got it fixed, I had to set some more permissions that weren't on the guide.

@ZakShearman commented on GitHub (Aug 11, 2019): Got it fixed, I had to set some more permissions that weren't on the guide.
Author
Owner

@MylesBR commented on GitHub (Nov 23, 2019):

Hi Zak

What permission did you change? I am facing the same error

HP message: PHP Fatal error:  Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.php): failed to open stream: Permission denied in /var/www/BookStac
k/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122
Stack trace:
#0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array)
#1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0)
#2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...', '<?php $__env->s...')
#3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www/Bo

and tried to fix with

sudo chown -R nginx:nginx /var/www/{BookStack,sessions} 
sudo chmod -R 755 /var/www/html/BookStack/
sudo chmod -R 755 /var/www/html/sessions/php 
@MylesBR commented on GitHub (Nov 23, 2019): Hi Zak What permission did you change? I am facing the same error ``` HP message: PHP Fatal error: Uncaught ErrorException: file_put_contents(/var/www/BookStack/storage/framework/views/4b8e70439d73c1f6b6ab796f9756cda764dd98e9.php): failed to open stream: Permission denied in /var/www/BookStac k/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php:122 Stack trace: #0 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'file_put_conten...', '/var/www/BookSt...', 122, Array) #1 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(122): file_put_contents('/var/www/BookSt...', '<?php $__env->s...', 0) #2 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Compilers/BladeCompiler.php(121): Illuminate\Filesystem\Filesystem->put('/var/www/BookSt...', '<?php $__env->s...') #3 /var/www/BookStack/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(51): Illuminate\View\Compilers\BladeCompiler->compile('/var/www/Bo ``` and tried to fix with ``` sudo chown -R nginx:nginx /var/www/{BookStack,sessions} sudo chmod -R 755 /var/www/html/BookStack/ sudo chmod -R 755 /var/www/html/sessions/php ```
Author
Owner

@ZakShearman commented on GitHub (Nov 23, 2019):

Sorry, it's been so long and I have completely no idea. I also barely use BookStack now.

Sorry, I hope you find the solution to your issue.

@ZakShearman commented on GitHub (Nov 23, 2019): Sorry, it's been so long and I have completely no idea. I also barely use BookStack now. Sorry, I hope you find the solution to your issue.
Author
Owner

@MylesBR commented on GitHub (Nov 23, 2019):

no problem, thanks anyway.

@MylesBR commented on GitHub (Nov 23, 2019): no problem, thanks anyway.
Author
Owner

@Blade2021 commented on GitHub (Feb 2, 2020):

Its issue with permissions on storage folder.

@Blade2021 commented on GitHub (Feb 2, 2020): Its issue with permissions on storage folder.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1305