-1

i am getting this error as i integrate this forum in my website i am new to this error his is my config.php i had made changes according to my database i am new to this i don't know why and what is this error.

   <?php
    $dbms = 'phpbb\\db\\driver\\mysqli';
    $db host = 'localhost';
    $dbport = '';
    $dbname = 'abc_forum';
    $dbuser = 'root',
    $dbpasswd = '';
    $table_prefix = '';
    $phpbb_adm_relative_path ='adm/';
    $acm_type = 'phpbb\\cache\\driver\\file';
    @define('PHPBB_INSTALLED', true);
Alive to die - Anant
  • 70,531
  • 10
  • 51
  • 98
  • Can you show us the code that is throwing the error? Where you're actually executing the connections – Tom Jul 22 '17 at 06:59
  • 1
    https://www.phpbb.com/support/docs/en/3.1/kb/article/rebuilding-your-configphp-file/ – Alive to die - Anant Jul 22 '17 at 07:01
  • 1
    Possible duplicate of [Warning: mysqli\_connect(): (HY000/1045): Access denied for user 'username'@'localhost' (using password: YES)](https://stackoverflow.com/questions/25174183/warning-mysqli-connect-hy000-1045-access-denied-for-user-usernameloca) – S.I. Jul 22 '17 at 07:12
  • you should have a call to mysqli_connect() somewhere. It apparently isn't using the config values. – Garr Godfrey Jul 22 '17 at 07:13

3 Answers3

1

change $db host to $dbhost :

<?php
    $dbms = 'phpbb\\db\\driver\\mysqli';
    $dbhost = 'localhost';
    $dbport = '';
    $dbname = 'abc_forum';
    $dbuser = 'root',
    $dbpasswd = '';
    $table_prefix = '';
    $phpbb_adm_relative_path ='adm/';
    $acm_type = 'phpbb\\cache\\driver\\file';
    @define('PHPBB_INSTALLED', true);
Karthik
  • 5,589
  • 18
  • 46
  • 78
-1

The username and password are not valid. That is what this means. Ask your hosting provider for the correct credentials.

Digital Human
  • 1,599
  • 1
  • 16
  • 26
-1

Keep it simple

$conn = new mysqli("DB_HOST","USERNAME","PASSWORD","DATABASE");

Dhruvang Gajjar
  • 568
  • 1
  • 8
  • 20
  • Who downvoted? Do you have any reason for it.? Nothing is wrong or hard. I was try to simple the code. – Dhruvang Gajjar Jul 23 '17 at 02:10
  • Its not my downvote, but possibly because phpBB uses its own database abstraction layer, and that should be used. – Eeji Aug 12 '17 at 17:51