CRM: ChurchCRM 4.5.0 throws Fatal error while running setup

On what page in the application did you find this issue?

On running the setup

On what type of server is this running? Dedicated / Shared hosting? Linux / Windows?

Shared hosting Centos 7 Linux

What browser (and version) are you running?

Mozilla Firefox 104.0(64 bit)

What version of PHP is the server running?

PHP 7.3.33

What version of SQL Server are you running?

MYSQL 5.5.62

What version of ChurchCRM are you running?

4.5.0

I was in the process of manual installation of ChurchCRM 4.5.0 however on running the setup URL i.e :

http://domain.com/churchcrm450/setup/

Following Fatal error is thrown i.e :

Fatal error: Uncaught Propel\Runtime\Exception\RuntimeException: No connection defined for database "default". Did you forget to define a connection or is it wrong written? in /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php:303 Stack trace:
#0 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php(396): Propel\Runtime\ServiceContainer\StandardServiceContainer->getConnectionManager('default')
#1 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php(1117): Propel\Runtime\ServiceContainer\StandardServiceContainer->getReadConnection('default')
#2 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/ChurchCRM/model/ChurchCRM/ListOptionQuery.php(28): Propel\Runtime\ActiveQuery\ModelCriteria->find()
#3 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/ChurchCRM/dto/SystemConfig.php(65): ChurchCRM\ListOptionQuery->getFamilyRoles()
#4 /h in /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php on line 303

Also following is thrown in external.log file under logs folder :

[31-Aug-2022 01:57:50 America/New_York] PHP Fatal error:  Uncaught Propel\Runtime\Exception\RuntimeException: No connection defined for database "default". Did you forget to define a connection or is it wrong written? in /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php:303
Stack trace:
#0 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php(396): Propel\Runtime\ServiceContainer\StandardServiceContainer->getConnectionManager('default')
#1 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php(1117): Propel\Runtime\ServiceContainer\StandardServiceContainer->getReadConnection('default')
#2 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/ChurchCRM/model/ChurchCRM/ListOptionQuery.php(28): Propel\Runtime\ActiveQuery\ModelCriteria->find()
#3 /{{PATH}}/{{TO}}/{{CHURCHCRM}}/ChurchCRM/dto/SystemConfig.php(65): ChurchCRM\ListOptionQuery->getFamilyRoles()
#4 /h in /{{PATH}}/{{TO}}/{{CHURCHCRM}}/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php on line 303

What could be causing the issue ? . Could you please check and replicate this at your end and fix this ?.

Regards.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Does anyone has solution for this issue? I encounter the same fatal error when trying to install the 4.5 version

I spun up a brand-new VM running Debian 11.5 and the release version of ChurchCRM 4.5.0. I can confirm this appears to be a bug in our code and is repeatable on new setups:

[26-Sep-2022 13:17:02 Australia/Sydney] PHP Fatal error:  Uncaught Propel\Runtime\Exception\RuntimeException: No connection defined for database "default". Did you forget to define a connection or is it wrong written? in /var/www/html/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php:303
Stack trace:
#0 /var/www/html/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php(396): Propel\Runtime\ServiceContainer\StandardServiceContainer->getConnectionManager()
#1 /var/www/html/vendor/propel/propel/src/Propel/Runtime/ActiveQuery/ModelCriteria.php(1117): Propel\Runtime\ServiceContainer\StandardServiceContainer->getReadConnection()
#2 /var/www/html/ChurchCRM/model/ChurchCRM/ListOptionQuery.php(28): Propel\Runtime\ActiveQuery\ModelCriteria->find()
#3 /var/www/html/ChurchCRM/dto/SystemConfig.php(65): ChurchCRM\ListOptionQuery->getFamilyRoles()
#4 /var/www/html/ChurchCRM/dto/SystemConfig.php(79): ChurchCRM\dto\SystemConfig::getFamilyRoleChoices()
#5 /var/www/html/ChurchCRM/dto/SystemConfig.php(289): ChurchCRM\ in /var/www/html/vendor/propel/propel/src/Propel/Runtime/ServiceContainer/StandardServiceContainer.php on line 303

However, this can be worked around by:

  1. Copy Include/Config.php.example to Include/Config.php
  2. Edit Include/Config.php as follows:
    • Enter the correct DB server address, port, and credentials.
    • Edit the $srootPath='...'; per the instructions in the config file.
    • Edit the $URL[0] = '...'; per the instructions in the file.
  3. SAVE THE FILE and close it.
  4. Go back to your web browser and reload the page (without the .../setup/ on the end)
  5. You should see the login screen. Login with “admin/changeme

On the first load of the page (step 4 above) there will be a short delay as the database schema is installed:

[2022-09-26T13:26:16.443893+10:00] defaultLogger.INFO: Installing ChurchCRM Schema [] {"url":"/index.php","remote_ip":"10.0.0.72","correlation_id":"63311bd86c600"}
[2022-09-26T13:26:18.649964+10:00] defaultLogger.INFO: Installed ChurchCRM Schema version: 4.5.0 [] {"url":"/index.php","remote_ip":"10.0.0.72","correlation_id":"63311bd86c600"}