There is an answer here, https://bbpress.org/forums/topic/require_oncepathtowp-blog-headerphp
Saying:
Put in the full path from the server root instead of the relative path.
But I don’t know how to code it and what line to place it
I followed this
bbPress will not have access to WordPress’ functions unless you manually tell bbPress to load WordPress first. In order to do that, you need to put require_once(‘path/to/wp-blog-header.php’); in bbPress’ bb-config.php (wp-blog-header is in the same directory as WordPress’ wp-config.php file).
and it looks like this
require_once( dirname(__FILE__) . ‘/wp-config.php’);
this is located in http://domain.com
my bbpress is on http://forums.domain.com and I am using Cpanel