HTTP ERROR 500 #1679

Closed
opened 2026-02-05 01:35:17 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @Blade2021 on GitHub (Apr 24, 2020).

Describe the bug
HTTP ERROR 500 when going to site. I upgraded to the latest and greatest, updated my php to version 7.4, installed all the dependents (as far as I know).

Steps To Reproduce
Going to site, I get HTTP ERROR 500

Expected behavior
I would intend for the site to load as it did before updating.

Screenshots
None.

Your Configuration (please complete the following information):

  • Exact BookStack Version (Found in settings): Updated to latest origin.
  • PHP Version: 7.4 ( PHP 7.4.5 (cli) (built: Apr 19 2020 08:42:37) ( NTS ))
  • Hosting Method (Nginx/Apache/Docker): Apache

Additional context
I've had this issue before. I believe I had to play with file permissions to get it to work but can't remember which files had to be adjusted.

Originally created by @Blade2021 on GitHub (Apr 24, 2020). **Describe the bug** HTTP ERROR 500 when going to site. I upgraded to the latest and greatest, updated my php to version 7.4, installed all the dependents (as far as I know). **Steps To Reproduce** Going to site, I get HTTP ERROR 500 **Expected behavior** I would intend for the site to load as it did before updating. **Screenshots** None. **Your Configuration (please complete the following information):** - Exact BookStack Version (Found in settings): Updated to latest origin. - PHP Version: 7.4 ( PHP 7.4.5 (cli) (built: Apr 19 2020 08:42:37) ( NTS )) - Hosting Method (Nginx/Apache/Docker): Apache **Additional context** I've had this issue before. I believe I had to play with file permissions to get it to work but can't remember which files had to be adjusted.
OVERLORD added the 🐕 Support label 2026-02-05 01:35:17 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Apr 24, 2020):

Hi @Blade2021,
If you think this may be due to permissions, The following directories (And all subdirectories) need to be writable by BookStack:

  • bootstrap/cache
  • storage
  • public/uploads

If running Ubuntu you can generall achieve this by running the below from your BookStack install directory:

chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage
@ssddanbrown commented on GitHub (Apr 24, 2020): Hi @Blade2021, If you think this may be due to permissions, The following directories (And all subdirectories) need to be writable by BookStack: * `bootstrap/cache` * `storage` * `public/uploads` If running Ubuntu you can generall achieve this by running the below from your BookStack install directory: ```bash chown www-data:www-data -R bootstrap/cache public/uploads storage && chmod -R 755 bootstrap/cache public/uploads storage ```
Author
Owner

@Blade2021 commented on GitHub (Apr 24, 2020):

Hello @ssddanbrown

I appreciate the quick follow up. I have ran that command but i'm not seeing any changes on my end. I believe chown was the ticket to getting it working last time but I'm not sure.

I added the debug line to my .env and moved the old larvellog to a new filename but i'm not seeing any logs being generated. I also restarted apache to try to force it to update the log.

@Blade2021 commented on GitHub (Apr 24, 2020): Hello @ssddanbrown I appreciate the quick follow up. I have ran that command but i'm not seeing any changes on my end. I believe chown was the ticket to getting it working last time but I'm not sure. I added the debug line to my .env and moved the old larvellog to a new filename but i'm not seeing any logs being generated. I also restarted apache to try to force it to update the log.
Author
Owner

@ssddanbrown commented on GitHub (Apr 24, 2020):

@Blade2021 If the 500 error page, that you see, a default-looking white one? Or does the BookStack header still show?

@ssddanbrown commented on GitHub (Apr 24, 2020): @Blade2021 If the 500 error page, that you see, a default-looking white one? Or does the BookStack header still show?
Author
Owner

@ssddanbrown commented on GitHub (Apr 24, 2020):

@Blade2021 If it's a default white one, You'll be better checking the apache log, often found here on Ubuntu:

/var/log/apache2/error.log
@ssddanbrown commented on GitHub (Apr 24, 2020): @Blade2021 If it's a default white one, You'll be better checking the apache log, often found here on Ubuntu: ``` /var/log/apache2/error.log ```
Author
Owner

@Blade2021 commented on GitHub (Apr 24, 2020):

Ahh! good call!

I pasted the output of the log file here. Dissecting it now.
https://pastebin.com/xpH4Pvy4

From the looks of it, looks like the main issue is:
PHP Parse error: syntax error, unexpected '=' in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Support/Arr.php$

@Blade2021 commented on GitHub (Apr 24, 2020): Ahh! good call! I pasted the output of the log file here. Dissecting it now. https://pastebin.com/xpH4Pvy4 From the looks of it, looks like the main issue is: `PHP Parse error: syntax error, unexpected '=' in /var/www/BookStack/vendor/laravel/framework/src/Illuminate/Support/Arr.php$`
Author
Owner

@ssddanbrown commented on GitHub (Apr 25, 2020):

@Blade2021 My guess is that maybe BookStack is running on an older, not supported, version of PHP? I know you stated a PHP version of 7.4 but the output was from the command line, Is Apache using PHP7.4 or is it using an older version of PHP that's still on the system?

@ssddanbrown commented on GitHub (Apr 25, 2020): @Blade2021 My guess is that maybe BookStack is running on an older, not supported, version of PHP? I know you stated a PHP version of 7.4 but the output was from the command line, Is Apache using PHP7.4 or is it using an older version of PHP that's still on the system?
Author
Owner

@Blade2021 commented on GitHub (Apr 26, 2020):

@ssddanbrown

When I run php -v it says 7.4 but i'll double check.

@Blade2021 commented on GitHub (Apr 26, 2020): @ssddanbrown When I run php -v it says 7.4 but i'll double check.
Author
Owner

@ssddanbrown commented on GitHub (Apr 26, 2020):

Yeah, That will show the command line php version, The version Apache is using can be quite different.

@ssddanbrown commented on GitHub (Apr 26, 2020): Yeah, That will show the command line php version, The version Apache is using can be quite different.
Author
Owner

@Blade2021 commented on GitHub (Apr 27, 2020):

Well solved that problem but broke another. I have another site that is using php7.0 so disabling php7.0 globally isn't going to work. Do you know of a way to make php7.4 run for that virtual host? I did a quick search but every answer was going a completely different direction.

@Blade2021 commented on GitHub (Apr 27, 2020): Well solved that problem but broke another. I have another site that is using php7.0 so disabling php7.0 globally isn't going to work. Do you know of a way to make php7.4 run for that virtual host? I did a quick search but every answer was going a completely different direction.
Author
Owner

@ssddanbrown commented on GitHub (Apr 27, 2020):

@Blade2021 BookStack will work down to php7.2, So if the other app at least works up to 7.2 maybe you could use that as a common-compatible version?

Otherwise, Have never done mulitple PHP versions on apache, only on Nginx. This guide looks sensible:
https://tecadmin.net/install-multiple-php-version-apache-ubuntu/
You could leave the default version for apache as php 7.0 then only follow the guide for the BookStack install & php7.4, to reduce setup required.

@ssddanbrown commented on GitHub (Apr 27, 2020): @Blade2021 BookStack will work down to php7.2, So if the other app at least works up to 7.2 maybe you could use that as a common-compatible version? Otherwise, Have never done mulitple PHP versions on apache, only on Nginx. This guide looks sensible: https://tecadmin.net/install-multiple-php-version-apache-ubuntu/ You could leave the default version for apache as php 7.0 then only follow the guide for the BookStack install & php7.4, to reduce setup required.
Author
Owner

@ssddanbrown commented on GitHub (Jun 30, 2020):

Since this conversation has gone quiet, I'll close this off.

@ssddanbrown commented on GitHub (Jun 30, 2020): Since this conversation has gone quiet, I'll close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1679