HTTP error 500 #1243

Closed
opened 2026-02-05 00:22:10 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @corentincharron on GitHub (Jul 1, 2019).

Description
Hello, my Bookstack installation "stopped working" and is now returning an error 500. The only thing I did around the time where it stopped working (although I did not check the website straight after) was to execute the backup commands (database and filex) from the documentation. I literary have no idea where to start investigating.

Configuration:

  • BookStack Version: v0.26.2
  • PHP Version: v7.2.19
  • Hosting Method: Ubuntu 18.04 Droplet (DigitalOcean), set up with the installation script

Additional context
Here is the message from the Laravel logs everything I load the bookstack URL:

[2019-07-01 16:17:28] production.ERROR: Dotenv values containing spaces must be surrounded by quotes. {"exception":"[object] (Dotenv\\Exception\\InvalidFileException(code: 0): Dotenv values containing spaces must be surrounded by quotes. at /var/www/bookstack/vendor/vlucas/phpdotenv/src/Loader.php:262)
[stacktrace]
// Lines removed for security
/var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php(27): Dotenv\\Dotenv->load()
#7 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables->bootstrap(Object(Illuminate\\Foundation\\Application))
#8 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array)
#9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap()
#10 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#11 /var/www/bookstack/public/index.php(53): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#12 {main}
"} 

Thanks a lot!

Originally created by @corentincharron on GitHub (Jul 1, 2019). **Description** Hello, my Bookstack installation "stopped working" and is now returning an error 500. The only thing I did around the time where it stopped working (although I did not check the website straight after) was to execute the backup commands (database and filex) from the documentation. I literary have no idea where to start investigating. **Configuration:** - BookStack Version: v0.26.2 - PHP Version: v7.2.19 - Hosting Method: Ubuntu 18.04 Droplet (DigitalOcean), set up with the installation script **Additional context** Here is the message from the Laravel logs everything I load the bookstack URL: ``` [2019-07-01 16:17:28] production.ERROR: Dotenv values containing spaces must be surrounded by quotes. {"exception":"[object] (Dotenv\\Exception\\InvalidFileException(code: 0): Dotenv values containing spaces must be surrounded by quotes. at /var/www/bookstack/vendor/vlucas/phpdotenv/src/Loader.php:262) [stacktrace] // Lines removed for security /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/LoadEnvironmentVariables.php(27): Dotenv\\Dotenv->load() #7 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\\Foundation\\Bootstrap\\LoadEnvironmentVariables->bootstrap(Object(Illuminate\\Foundation\\Application)) #8 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(162): Illuminate\\Foundation\\Application->bootstrapWith(Array) #9 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(146): Illuminate\\Foundation\\Http\\Kernel->bootstrap() #10 /var/www/bookstack/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(116): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request)) #11 /var/www/bookstack/public/index.php(53): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request)) #12 {main} "} ``` Thanks a lot!
OVERLORD added the 🐕 Support label 2026-02-05 00:22:10 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 2, 2019):

Hi @corentincharron,
I've edited your original post just to remove some encoded data that could have potentially been private (I didn't decode to check though).

Can you review your .env file and look for any values that contain a space or complex characters? It's likely these options that are causing issues. Anything with a space has to be wrapped in quotes if appropriate (For Example: MAIL_FROM="Dan Brown")

@ssddanbrown commented on GitHub (Jul 2, 2019): Hi @corentincharron, I've edited your original post just to remove some encoded data that could have potentially been private (I didn't decode to check though). Can you review your `.env` file and look for any values that contain a space or complex characters? It's likely these options that are causing issues. Anything with a space has to be wrapped in quotes if appropriate (For Example: `MAIL_FROM="Dan Brown"`)
Author
Owner

@corentincharron commented on GitHub (Jul 2, 2019):

That was it @ssddanbrown!
The .env became corrupted because I messed around with the backup archiving command

Thank you very much! (And well done for this incredibly well-thought and designed application)

@corentincharron commented on GitHub (Jul 2, 2019): That was it @ssddanbrown! The `.env` became corrupted because I messed around with the backup archiving command Thank you very much! (And well done for this incredibly well-thought and designed application)
Author
Owner

@ssddanbrown commented on GitHub (Jul 3, 2019):

@corentincharron Awesome, Happy to hear you got things going again!

@ssddanbrown commented on GitHub (Jul 3, 2019): @corentincharron Awesome, Happy to hear you got things going again!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#1243