0

when i try to register through the register form throws this error:

Fatal error: Uncaught PDOException: PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in /Applications/Ampps/www/database.php:8 Stack trace: #0 /Applications/Ampps/www/database.php(8): PDO->__construct('mysql:host=loca...', 'iek', '123') #1 /Applications/Ampps/www/myfuncs.php(2): require_once('/Applications/A...') #2 /Applications/AMPPS/www/login.php(3): require_once('/Applications/A...') #3 {main} Next PDOException: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client in /Applications/Ampps/www/database.php:8 Stack trace: #0 /Applications/Ampps/www/database.php(8): PDO->__construct('mysql:host=loca...', 'iek', '123') #1 /Applications/Ampps/www/myfuncs.php(2): require_once('/Applications/A...') #2 /Applications/AMPPS/www/login.php(3): require_once('/Applications/A...') #3 {main} thrown in /Applications/Ampps/www/database.php on line 8

I use the following files: create_database.sql, register.php, login.php, myfuncs.php, and database.php Please help I have make it work!! thanks in advance

Dharman
  • 30,962
  • 25
  • 85
  • 135
J.Denver
  • 11
  • 3
  • Did you spend a few moments googling the error? https://stackoverflow.com/questions/49083573/php-7-2-2-mysql-8-0-pdo-gives-authentication-method-unknown-to-the-client-ca – ADyson Jan 31 '21 at 12:34
  • We need to see your code in order to be able to help. – Tom Jan 31 '21 at 13:12
  • @Tom not really, it's a config error. See the link I gave above – ADyson Jan 31 '21 at 13:15
  • these are my files: https://1drv.ms/u/s!AhOyEirt_S13j2UdOKfYb5obNRLo?e=TCBvHu – J.Denver Jan 31 '21 at 13:26
  • @JDenver your code files are irrelevant. See the link I gave and/or the one marked as duplicate (the root cause is the same whether you're using mysqli or pdo). In future please Google your errors before asking. – ADyson Jan 31 '21 at 13:49

0 Answers0