chetans9 / core-php-admin-panel

An Admin panel written in core php with CRUD, filters and pagination.
http://freecs9.epizy.com/core-php-admin
283 stars 141 forks source link

Fatal Error, please help #12

Closed 51gz closed 5 years ago

51gz commented 5 years ago

I placed the files in htdocs and created the db with name corephpadmin as how it was default in config but this is the error reflected when I try login (either right user credential or a wrong, it takes to this error message)

Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\corephpadmin\lib\MysqliDb\MysqliDb.php on line 323

Fatal error: Uncaught Exception: Connect Error 1045: Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\corephpadmin\lib\MysqliDb\MysqliDb.php:326 Stack trace: #0 C:\xampp\htdocs\corephpadmin\lib\MysqliDb\MysqliDb.php(415): MysqliDb->connect('default') #1 C:\xampp\htdocs\corephpadmin\lib\MysqliDb\MysqliDb.php(1988): MysqliDb->mysqli() #2 C:\xampp\htdocs\corephpadmin\lib\MysqliDb\MysqliDb.php(1594): MysqliDb->_prepareQuery() #3 C:\xampp\htdocs\corephpadmin\lib\MysqliDb\MysqliDb.php(738): MysqliDb->_buildQuery(NULL) #4 C:\xampp\htdocs\corephpadmin\authenticate.php(14): MysqliDb->get('admin_accounts') #5 {main} thrown in C:\xampp\htdocs\corephpadmin\lib\MysqliDb\MysqliDb.php on line 326

Please help me to solve the issue, thank you

51gz commented 5 years ago

Update:

I somhow fixed it but now the username: admin and password: admin doesn't work, it says Invalid user name or password

I tried password_hash('your_password',PASSWORD_DEFAULT); and updated password column in DB but nothing worked.

Sorry I was updating in a different db, now all good.