Skip to content

Ugly PHP fatal error when DB is off #622

Closed

Description

@eMerzh

In the stable45 , with postgresql,

if you db is offline and you try to access the interface,
oC give you this awefull error


Call Stack:
    0.0001     329016   1. {main}() /var/www/pgoc/core/index.php:0
    0.0027     556140   2. require_once('/var/www/pgoc/core/lib/base.php') /var/www/pgoc/core/index.php:26
    0.0027     556140   3. OC::init() /var/www/pgoc/core/lib/base.php:602
    0.0056     689716   4. OC::initTemplateEngine() /var/www/pgoc/core/lib/base.php:339
    0.0079     905448   5. OC_Appconfig::getValue() /var/www/pgoc/core/lib/base.php:252
    0.0100    1108124   6. OC_DB::prepare() /var/www/pgoc/core/lib/appconfig.php:94
    0.0100    1108212   7. OC_DB::processQuery() /var/www/pgoc/core/lib/db.php:312
    0.0100    1108212   8. OC_DB::connect() /var/www/pgoc/core/lib/db.php:548
    0.0101    1108256   9. OC_DB::connectPDO() /var/www/pgoc/core/lib/db.php:87
    0.0125    1246356  10. OC_Template::printErrorPage() /var/www/pgoc/core/lib/db.php:171
    0.0125    1247644  11. OC_Template::printGuestPage() /var/www/pgoc/core/lib/template.php:495
    0.0137    1326404  12. OC_Template->printPage() /var/www/pgoc/core/lib/template.php:483
    0.0137    1326404  13. OC_Template->fetchPage() /var/www/pgoc/core/lib/template.php:354
    0.0150    1429212  14. OC_TemplateLayout->__construct() /var/www/pgoc/core/lib/template.php:375
    0.0188    1645456  15. OC_App::getEnabledApps() /var/www/pgoc/core/lib/templatelayout.php:39
    0.0188    1645920  16. OC_DB::prepare() /var/www/pgoc/core/lib/app.php:148
    0.0189    1646008  17. OC_DB::processQuery() /var/www/pgoc/core/lib/db.php:312
    0.0189    1646008  18. OC_DB::connect() /var/www/pgoc/core/lib/db.php:548
    0.0189    1646052  19. OC_DB::connectPDO() /var/www/pgoc/core/lib/db.php:87
    0.0200    1675340  20. OC_Template::printErrorPage() /var/www/pgoc/core/lib/db.php:171
    0.0200    1676628  21. OC_Template::printGuestPage() /var/www/pgoc/core/lib/template.php:495
    0.0203    1678356  22. OC_Template->printPage() /var/www/pgoc/core/lib/template.php:483
    0.0203    1678356  23. OC_Template->fetchPage() /var/www/pgoc/core/lib/template.php:354
    0.0204    1679316  24. OC_TemplateLayout->__construct() /var/www/pgoc/core/lib/template.php:375
    0.0206    1680468  25. OC_App::getEnabledApps() /var/www/pgoc/core/lib/templatelayout.php:39
    0.0207    1680932  26. OC_DB::prepare() /var/www/pgoc/core/lib/app.php:148
    0.0207    1681020  27. OC_DB::processQuery() /var/www/pgoc/core/lib/db.php:312
    0.0207    1681020  28. OC_DB::connect() /var/www/pgoc/core/lib/db.php:548
    0.0207    1681064  29. OC_DB::connectPDO() /var/www/pgoc/core/lib/db.php:87
    0.0215    1723208  30. OC_Template::printErrorPage() /var/www/pgoc/core/lib/db.php:171
    0.0215    1724496  31. OC_Template::printGuestPage() /var/www/pgoc/core/lib/template.php:495
    0.0218    1726224  32. OC_Template->printPage() /var/www/pgoc/core/lib/template.php:483
    0.0218    1726224  33. OC_Template->fetchPage() /var/www/pgoc/core/lib/template.php:354
.....

i think @karlitschek change smth in this area some times ago right? it may be a side effect

Activity

  1. DeepDiver1975 commented on Nov 29, 2012

    @DeepDiver1975
    Contributor

    @eMerzh what is the behavior with MySql?

  2. eMerzh commented on Nov 29, 2012

    @eMerzh
    ContributorAuthor

    Mmhh ... just changed the DB type to mysql ... and same problem :s

  3. eMerzh commented on Nov 29, 2012

    @eMerzh
    ContributorAuthor

    seems the problem is from e56de16 ... the backport of #562 by @karlitschek

  4. eMerzh commented on Nov 29, 2012

    @eMerzh
    ContributorAuthor

    @karlitschek it seems that it's the same thing with master in fact :p

    the thing is that when trying to display the error page, it call get config value that query the db /o\

  5. eMerzh commented on Jan 26, 2013

    @eMerzh
    ContributorAuthor

    The pbm should be resolved with #1113

  6. eMerzh commented on Jan 27, 2013

    @eMerzh
    ContributorAuthor

    It will be fixed in the next stable ;)

  7. locked as resolved and limited conversation to collaborators on Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions