WM
Template + Firebird
Boa tarde.
Criei as bases de dados seguindo os comandos sql do template em Firebird 3.0.
Configurei o PHP para acessar o Firebird (PDO).
Fiz um pequeno programa em PHP + PDO e testei as bases de dados criadas pelos comandos SQL do template.
Contudo quando vou acessar o template e informo o usuário e senha obtenho a seguinte mensagem de erro :
"
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php on line 414
Fatal error: Uncaught TypeError: hash_equals(): Argument #1 ($known_string) must be of type string, null given in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php:430
Stack trace:
#0 D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php(430): hash_equals(Object(SensitiveParameterValue), Object(SensitiveParameterValue))
#1 D:xampphtdocsfluxo-expedicaoappserviceauthApplicationAuthenticationService.php(30): SystemUser::authenticate('admin', 'admin')
#2 D:xampphtdocsfluxo-expedicaoappcontroladminLoginForm.php(171): ApplicationAuthenticationService::authenticate('admin', 'admin', false)
#3 [internal function]: LoginForm::onLogin(Array)
#4 D:xampphtdocsfluxo-expedicaolibadianticoreAdiantiCoreApplication.php(77): call_user_func(Array, Array)
#5 D:xampphtdocsfluxo-expedicaoengine.php(42): AdiantiCoreAdiantiCoreApplication::run('1')
#6 D:xampphtdocsfluxo-expedicaoengine.php(73): TApplication::run()
#7 {main}
thrown in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php on line 430
"
Alguém pode me ajudar ?
Grato.
Criei as bases de dados seguindo os comandos sql do template em Firebird 3.0.
Configurei o PHP para acessar o Firebird (PDO).
Fiz um pequeno programa em PHP + PDO e testei as bases de dados criadas pelos comandos SQL do template.
Contudo quando vou acessar o template e informo o usuário e senha obtenho a seguinte mensagem de erro :
"
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php on line 414
Fatal error: Uncaught TypeError: hash_equals(): Argument #1 ($known_string) must be of type string, null given in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php:430
Stack trace:
#0 D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php(430): hash_equals(Object(SensitiveParameterValue), Object(SensitiveParameterValue))
#1 D:xampphtdocsfluxo-expedicaoappserviceauthApplicationAuthenticationService.php(30): SystemUser::authenticate('admin', 'admin')
#2 D:xampphtdocsfluxo-expedicaoappcontroladminLoginForm.php(171): ApplicationAuthenticationService::authenticate('admin', 'admin', false)
#3 [internal function]: LoginForm::onLogin(Array)
#4 D:xampphtdocsfluxo-expedicaolibadianticoreAdiantiCoreApplication.php(77): call_user_func(Array, Array)
#5 D:xampphtdocsfluxo-expedicaoengine.php(42): AdiantiCoreAdiantiCoreApplication::run('1')
#6 D:xampphtdocsfluxo-expedicaoengine.php(73): TApplication::run()
#7 {main}
thrown in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php on line 430
"
Alguém pode me ajudar ?
Grato.
Você está rodando a versão 8 do Framework?
Pergunto pois na versão oficial, na linha 414 (seu erro), não tem chamada da função substr().
Talvez "password" seja uma palavra reservada em alguma versão do Firebird, verifique isso.
Pois na tabela de usuários, tem um campo "password".
Estou usando a versão 8 :
""
Deprecated: substr(): Passing null to parameter #1 ($string) of type string is deprecated in "D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php on line 410
Fatal error: Uncaught TypeError: hash_equals(): Argument #1 ($known_string) must be of type string, null given in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php:426
Stack trace:
#0 D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php(426): hash_equals(Object(SensitiveParameterValue), Object(SensitiveParameterValue))
#1 D:xampphtdocsfluxo-expedicaoappserviceauthApplicationAuthenticationService.php(30): SystemUser::authenticate('admin', 'admin')
#2 D:xampphtdocsfluxo-expedicaoappcontroladminLoginForm.php(171): ApplicationAuthenticationService::authenticate('admin', 'admin', false)
#3 [internal function]: LoginForm::onLogin(Array)
#4 D:xampphtdocsfluxo-expedicaolibadianticoreAdiantiCoreApplication.php(77): call_user_func(Array, Array)
#5 D:xampphtdocsfluxo-expedicaoengine.php(42): AdiantiCoreAdiantiCoreApplication::run('1')
#6 D:xampphtdocsfluxo-expedicaoengine.php(73): TApplication::run()
#7 {main}
thrown in D:xampphtdocsfluxo-expedicaoappmodeladminSystemUser.php on line 426
""
Tinha feito alterações para ver os dados que eram retornados.
PASSWORD não é uma palavra reservada.
Reparei que não retorna o campo PASSWORD para o objeto, por isso o erro.
Fiz um programa em PHP + PDO que retornou os dados sem problemas.
Contudo não consigo fazer funcionar no framework.