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

Blank page returned when unable to connect to database server #131

Closed
adamcaudill opened this issue Aug 28, 2016 · 1 comment
Closed

Blank page returned when unable to connect to database server #131

adamcaudill opened this issue Aug 28, 2016 · 1 comment
Labels
bug
Milestone

Comments

@adamcaudill
Copy link
Collaborator

@adamcaudill adamcaudill commented Aug 28, 2016

Summary

If the application isn't able to connect to its database server, it returns a 500, with a blank page.

Expected Outcome

Display a useful error message, so that there's some indication of what happened.

2016/08/28 22:01:19 [error] 29847#29847: *13650 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: connection in /var/www/beta.example.com/airship/src/config/logger.php on line 38
PHP message: PHP Fatal error:  Uncaught Airship\Alerts\Database\DBException: Could not create a database connection. Please check your username and password. in /var/www/beta.example.com/airship/src/Engine/Database.php:100
Stack trace:
#0 /var/www/beta.example.com/airship/src/Airship.php(384): Airship\Engine\Database::factory('pgsql:host=loca...', 'db_name', '555-555-0199@ex...', Array)
#1 /var/www/beta.example.com/airship/src/Engine/LedgerStorage/DBStore.php(46): Airship\get_database()
#2 /var/www/beta.example.com/airship/src/config/logger.php(41): Airship\Engine\LedgerStorage\DBStore->__construct(NULL, '')
#3 /var/www/beta.example.com/airship/src/config/logger.php(54): {closure}()
#4 /var/www/beta.example.com/airship/src/bootstrap.php(170): require_once('/var/www/beta.a...')
#5 /var/www/beta.example.com/airship/src/public/index.php(91): require_once('/var/www/beta.a...')
#6 {main}
  thrown in /var/www/beta.example.com/airship/src/Engine/Database.php on line 100" while reading response header from upstream, client: 127.0.0.1, server: beta.example.com, request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.0-fpm.sock:", host: "beta.example.com"
@paragonie-scott
Copy link
Member

@paragonie-scott paragonie-scott commented Aug 28, 2016

👍 3bb2307

@paragonie-scott paragonie-scott added this to the Version 1.3.0 milestone Aug 29, 2016
@paragonie-scott paragonie-scott added the bug label Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.