`Error, the child config "firewalls" under "security" must be configured` when attempting to clear the cache

I am attempting to clear the SuiteCRM application cache using ./bin/console cache:clear, here is the full error:

PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/crm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 134
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/crm/vendor/symfony/http-foundation/Session/Attribute/AttributeBag.php on line 144
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/crm/vendor/symfony/http-foundation/Session/Session.php on line 131
PHP Deprecated:  Return type of Symfony\Component\HttpFoundation\Session\Session::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/crm/vendor/symfony/http-foundation/Session/Session.php on line 141

 // Clearing the cache for the prod environment with debug false                                                        


In ArrayNode.php line 226:
                                                                     
  The child config "firewalls" under "security" must be configured.  
                                                                     

cache:clear [--no-warmup] [--no-optional-warmers]

I have tried with both --no-warmup and --no-optional-warmers, when using both at the same time, I get a successful clear of the cache but the website responds with an internal error (500). This is all on a test VM, so I decided to copy the cache from the production VM and place it into the test VM crm/cache directory. This fixed that issue, but I cannot clear the cache, which is preventing me from upgrading from SuiteCRM 8.2.4 to 8.4.1.

suitecrm.log provides nothing, but heres what I got from the apache logs:

[Thu Oct 19 15:56:44.452208 2023] [proxy_fcgi:error] [pid 137814] [client 10.0.1.74:61061] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught RuntimeException: Unable to write in the "cache" directory (/var/www/crm/cache/prod). in /var/www/crm/vendor/symfony/http-kernel/Kernel.php:636\nStack trace:\n#0 /var/www/crm/vendor/symfony/http-kernel/Kernel.php(540): Symfony\\Component\\HttpKernel\\Kernel->buildContainer()\n#1 /var/www/crm/core/backend/Kernel.php(124): Symfony\\Component\\HttpKernel\\Kernel->initializeContainer()\n#2 /var/www/crm/public/index.php(34): App\\Kernel->getLegacyRoute()\n#3 {main}\n  thrown in /var/www/crm/vendor/symfony/http-kernel/Kernel.php on line 636'
[Thu Oct 19 15:56:51.690877 2023] [proxy_fcgi:error] [pid 137935] [client 10.0.1.74:61063] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught RuntimeException: Unable to write in the "cache" directory (/var/www/crm/cache/prod). in /var/www/crm/vendor/symfony/http-kernel/Kernel.php:636\nStack trace:\n#0 /var/www/crm/vendor/symfony/http-kernel/Kernel.php(540): Symfony\\Component\\HttpKernel\\Kernel->buildContainer()\n#1 /var/www/crm/core/backend/Kernel.php(124): Symfony\\Component\\HttpKernel\\Kernel->initializeContainer()\n#2 /var/www/crm/public/index.php(34): App\\Kernel->getLegacyRoute()\n#3 {main}\n  thrown in /var/www/crm/vendor/symfony/http-kernel/Kernel.php on line 636'
[Thu Oct 19 15:59:59.036984 2023] [proxy_fcgi:error] [pid 138106] [client 10.0.1.74:61109] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException: The child config "firewalls" under "security" must be configured. in /var/www/crm/vendor/symfony/config/Definition/ArrayNode.php:226\nStack trace:\n#0 /var/www/crm/vendor/symfony/config/Definition/BaseNode.php(455): Symfony\\Component\\Config\\Definition\\ArrayNode->finalizeValue()\n#1 /var/www/crm/vendor/symfony/config/Definition/Processor.php(36): Symfony\\Component\\Config\\Definition\\BaseNode->finalize()\n#2 /var/www/crm/vendor/symfony/config/Definition/Processor.php(46): Symfony\\Component\\Config\\Definition\\Processor->process()\n#3 /var/www/crm/vendor/symfony/dependency-injection/Extension/Extension.php(111): Symfony\\Component\\Config\\Definition\\Processor->processConfiguration()\n#4 /var/www/crm/vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php(102): Symfony\\Component\\DependencyInjection\\Extension\\Extension->processConfiguration()\n#5 /var/www/crm/vendor/symfony/dependen...'
[Thu Oct 19 16:00:00.281471 2023] [proxy_fcgi:error] [pid 138107] [client 10.0.1.74:61108] AH01071: Got error 'PHP message: PHP Fatal error:  Uncaught Symfony\\Component\\Config\\Definition\\Exception\\InvalidConfigurationException: The child config "firewalls" under "security" must be configured. in /var/www/crm/vendor/symfony/config/Definition/ArrayNode.php:226\nStack trace:\n#0 /var/www/crm/vendor/symfony/config/Definition/BaseNode.php(455): Symfony\\Component\\Config\\Definition\\ArrayNode->finalizeValue()\n#1 /var/www/crm/vendor/symfony/config/Definition/Processor.php(36): Symfony\\Component\\Config\\Definition\\BaseNode->finalize()\n#2 /var/www/crm/vendor/symfony/config/Definition/Processor.php(46): Symfony\\Component\\Config\\Definition\\Processor->process()\n#3 /var/www/crm/vendor/symfony/dependency-injection/Extension/Extension.php(111): Symfony\\Component\\Config\\Definition\\Processor->processConfiguration()\n#4 /var/www/crm/vendor/symfony/security-bundle/DependencyInjection/SecurityExtension.php(102): Symfony\\Component\\DependencyInjection\\Extension\\Extension->processConfiguration()\n#5 /var/www/crm/vendor/symfony/dependen...'

I am using the latest version of apache and mysql, while using php 7.4 , logins are handled both natively for the system administrator account, and through LDAP for regular users. Anyone have any idea on suggestions to lead me on the right path on fixing this issue?

Okay, I found out some more information, turns out this only happens when turning on my ldap configuration, even though this configuration is in use and working.

Okay, so, it turns out that my original configuration for .env.local for LDAP that used to work, does not work anymore and that was causing this issue, AUTH_TYPE=LDAP was the culprit, instead use AUTH_TYPE=ldap… I do not know why this is, considering LDAP worked before.

1 Like