LDAP authentication error (migration from v2024)

I am a happy owner of the phpmaker 2024 license and before upgrading the license I installed the phpmaker2025 trial version. it’s just that for all projects, even simple ones, it gives me this error, yet I checked all the extensions etc etc. can you help me?

Error

An internal error has occurred while processing your request.

Debug

#0 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\BaseNode.php(393): Symfony\Component\Config\Definition\VariableNode->finalizeValue(‘’) #1 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\ArrayNode.php(232): Symfony\Component\Config\Definition\BaseNode->finalize(‘’) #2 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\BaseNode.php(393): Symfony\Component\Config\Definition\ArrayNode->finalizeValue(Array) #3 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\ArrayNode.php(232): Symfony\Component\Config\Definition\BaseNode->finalize(Array) #4 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\BaseNode.php(393): Symfony\Component\Config\Definition\ArrayNode->finalizeValue(Array) #5 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\PrototypedArrayNode.php(165): Symfony\Component\Config\Definition\BaseNode->finalize(Array) #6 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\BaseNode.php(393): Symfony\Component\Config\Definition\PrototypedArrayNode->finalizeValue(Array) #7 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\ArrayNode.php(232): Symfony\Component\Config\Definition\BaseNode->finalize(Array) #8 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\BaseNode.php(393): Symfony\Component\Config\Definition\ArrayNode->finalizeValue(Array) #9 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\Processor.php(36): Symfony\Component\Config\Definition\BaseNode->finalize(Array) #10 D:\htdocs\rubrica2025\vendor\symfony\config\Definition\Processor.php(46): Symfony\Component\Config\Definition\Processor->process(Object(Symfony\Component\Config\Definition\ArrayNode), Array) #11 D:\htdocs\rubrica2025\vendor\symfony\dependency-injection\Extension\Extension.php(109): Symfony\Component\Config\Definition\Processor->processConfiguration(Object(Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration), Array) #12 D:\htdocs\rubrica2025\vendor\symfony\security-bundle\DependencyInjection\SecurityExtension.php(101): Symfony\Component\DependencyInjection\Extension\Extension->processConfiguration(Object(Symfony\Bundle\SecurityBundle\DependencyInjection\MainConfiguration), Array) #13 D:\htdocs\rubrica2025\vendor\symfony\dependency-injection\Compiler\MergeExtensionConfigurationPass.php(81): Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension->load(Array, Object(Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationContainerBuilder)) #14 D:\htdocs\rubrica2025\vendor\symfony\dependency-injection\Compiler\Compiler.php(73): Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #15 D:\htdocs\rubrica2025\vendor\symfony\dependency-injection\ContainerBuilder.php(752): Symfony\Component\DependencyInjection\Compiler\Compiler->compile(Object(Symfony\Component\DependencyInjection\ContainerBuilder)) #16 D:\htdocs\rubrica2025\src\SecurityContainerFactory.php(75): Symfony\Component\DependencyInjection\ContainerBuilder->compile() #17 [internal function]: PHPMaker2025\RUBRICA\SecurityContainerFactory->create(Object(DI\Container)) #18 D:\htdocs\rubrica2025\vendor\php-di\invoker\src\Invoker.php(74): call_user_func_array(Array, Array) #19 D:\htdocs\rubrica2025\vendor\php-di\php-di\src\Definition\Resolver\FactoryResolver.php(69): Invoker\Invoker->call(Array, Array) #20 D:\htdocs\rubrica2025\vendor\php-di\php-di\src\Definition\Resolver\ResolverDispatcher.php(60): DI\Definition\Resolver\FactoryResolver->resolve(Object(DI\Definition\FactoryDefinition), Array) #21 D:\htdocs\rubrica2025\vendor\php-di\php-di\src\Container.php(354): DI\Definition\Resolver\ResolverDispatcher->resolve(Object(DI\Definition\FactoryDefinition), Array) #22 D:\htdocs\rubrica2025\vendor\php-di\php-di\src\Container.php(136): DI\Container->resolveDefinition(Object(DI\Definition\FactoryDefinition)) #23 D:\htdocs\rubrica2025\src\phpfn.php(275): DI\Container->get(‘security.contai…’) #24 D:\htdocs\rubrica2025\src\phpfn.php(303): PHPMaker2025\RUBRICA\Container(‘security.contai…’) #25 D:\htdocs\rubrica2025\src\phpfn.php(334): PHPMaker2025\RUBRICA\SecurityContainer(‘security.helper’) #26 D:\htdocs\rubrica2025\src\phpfn.php(4993): PHPMaker2025\RUBRICA\SecurityHelper() #27 D:\htdocs\rubrica2025\src\phpfn.php(5194): PHPMaker2025\RUBRICA\CurrentUser() #28 D:\htdocs\rubrica2025\src\phpfn.php(7240): PHPMaker2025\RUBRICA\CurrentUserIdentifier() #29 D:\htdocs\rubrica2025\views\layout.php(23): PHPMaker2025\RUBRICA\GlobalClientVars() #30 D:\htdocs\rubrica2025\vendor\slim\php-view\src\PhpRenderer.php(219): include(‘D:\htdocs\rubri…’) #31 D:\htdocs\rubrica2025\vendor\slim\php-view\src\PhpRenderer.php(184): Slim\Views\PhpRenderer->protectedIncludeScope(‘views/layout.ph…’, Array) #32 D:\htdocs\rubrica2025\vendor\slim\php-view\src\PhpRenderer.php(155): Slim\Views\PhpRenderer->fetchTemplate(‘layout.php’, Array) #33 D:\htdocs\rubrica2025\src\HttpErrorHandler.php(190): Slim\Views\PhpRenderer->fetch(‘Error.php’, Array, true) #34 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\Handlers\ErrorHandler.php(136): PHPMaker2025\RUBRICA\HttpErrorHandler->respond() #35 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\Middleware\ErrorMiddleware.php(92): Slim\Handlers\ErrorHandler->__invoke(Object(Slim\Http\ServerRequest), Object(Symfony\Component\Config\Definition\Exception\InvalidConfigurationException), true, true, true) #36 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\Middleware\ErrorMiddleware.php(79): Slim\Middleware\ErrorMiddleware->handleException(Object(Slim\Http\ServerRequest), Object(Symfony\Component\Config\Definition\Exception\InvalidConfigurationException)) #37 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\MiddlewareDispatcher.php(129): Slim\Middleware\ErrorMiddleware->process(Object(Slim\Http\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous)) #38 D:\htdocs\rubrica2025\src\PhpDebugBarMiddleware.php(41): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Http\ServerRequest)) #39 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\MiddlewareDispatcher.php(129): PHPMaker2025\RUBRICA\PhpDebugBarMiddleware->process(Object(Slim\Http\ServerRequest), Object(Psr\Http\Server\RequestHandlerInterface@anonymous)) #40 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\MiddlewareDispatcher.php(73): Psr\Http\Server\RequestHandlerInterface@anonymous->handle(Object(Slim\Http\ServerRequest)) #41 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\App.php(209): Slim\MiddlewareDispatcher->handle(Object(Slim\Http\ServerRequest)) #42 D:\htdocs\rubrica2025\vendor\slim\slim\Slim\App.php(193): Slim\App->handle(Object(Slim\Http\ServerRequest)) #43 D:\htdocs\rubrica2025\index.php(132): Slim\App->run(Object(Slim\Http\ServerRequest)) #44 {main}

  1. Make sure you have done “composer update” successfully. You better delete the “vendor” folder and do composer update again. Make sure there is no error.
  2. Also check if the file src/config.security.php is generated and uploaded.
  3. Better still, delete all files in the project folder and generate all files again, avoid mixing old scripts (generated by previous version) and new scripts.

thanks, the problem was in the ldap configuration because when converted from the previous version the parameters gave an error. solved the problem but still I can’t do LDAP authentication anymore

phpmaker 2024 was like this, and it worked:

    // LDAP configuration (See https://ldaprecord.com/docs/core/v2/configuration)
    "LDAP_CONFIG" => [
        "username" => 'utenti\{username}', // User distinguished name, e.g. uid={username},dc=foo,dc=bar, "{username}" will be replaced by inputted user name
        "hosts" => ["10.6.203.3"],
        "base_dn" => "", // Base distinguished name, e.g. dc=foo,dc=bar
        "use_tls" => false,
        "use_ssl" => false,
        "port" => 389,
        "options" => [ ],
        "version" => 3,
        "timeout" => 5,
        "follow_referrals" => false
    ],

phpmaker 2025:

// LDAP users
            // See https://symfony.com/doc/current/security/ldap.html#fetching-users-using-the-ldap-user-provider
            'ldap_users' => [
                'ldap' => [
                    'service' => Ldap::class,
                    'base_dn' => 'dc=usr,dc=root,dc=jus', // Base distinguished name, e.g. dc=foo,dc=bar, default: null
                    'search_dn' => '', // default: null
                    'search_password' => '', // default: null
                    'default_roles' => ['PUBLIC_ACCESS'], // default: []
                    'uid_key' => null, // e.g. sAMAccountName, userPrincipalName, uid, default: sAMAccountName
                    'extra_fields' => null, // e.g. ['email'], default: null
                    'filter' => null, // default: ({uid_key}={user_identifier})
                    'password_attribute' => null
                ]
            ],
                  

                // This allows the user to login against an LDAP server
                // See https://symfony.com/doc/current/security/ldap.html#authenticating-against-an-ldap-server-1
                'form_login_ldap' => [
                    'check_path' => '/loginldap',
                    'login_path' => '/login',
                    'default_target_path' => '/',
                    'username_parameter' => 'username',
                    'password_parameter' => 'password',
                    'service' => Ldap::class,
                    'dn_string' => 'uid={user_identifier},dc=usr,dc=root,dc=jus', // e.g. uid={user_identifier},dc=foo,dc=bar, "{user_identifier}" will be replaced by inputted user name, default: {user_identifier}
                    'query_string' => '', // default: ''
                    'search_dn' => '', // default: ''
                    'search_password' => '', // default: ''
                    'success_handler' => AuthenticationSuccessHandler::class,
                    'failure_handler' => AuthenticationFailureHandler::class,
                ],
1 Like

Your new settings do not match your old settings, for exampe, you should try change your “base_dn” and “dn_string”.

perfect, it works. I would like to use ldaps, is it possible in phpmaker?