Skip to:
Content
Pages
Categories
Search
Top
Bottom

DB access problem in the first installation step.


  • StefanJohansson
    Member

    @stefanjohansson

    Hi!

    I am trying to install bbpress with WP 2.3.

    In the config-file for bbpress I have written EXACTLY the same databasename, username and password as in the config-file for WP.

    Still, when I run the install.php for bbpress I get several lines of “warnings”/error messages before the installation text “Welcome to…”

    Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user ‘nicuuorg’@’localhost’ (using password: NO) in /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-includes/db-mysqli.php on line 80

    Anyone understanding what’s going on.

    The WP runs without any problems.

    Could it be related to that the username is not correctly read from the config.php-file. The username is nicuuorg_stefanj, but access is denied for 'nicuuorg'@'localhost' according to the warning above.

Viewing 25 replies - 1 through 25 (of 27 total)

  • Sam Bauers
    Participant

    @sambauers

    Did you supply a password?

    Does that database username have a password?

    The error indicates there was none given.


    StefanJohansson
    Member

    @stefanjohansson

    Absolutely! The DB has a password and I wrote it correctly in the config-file.

    I just read in another thread about other people experiencing the same problem, here:

    http://bbpress.org/forums/topic/intergration-will-not-let-me-logon-using-my-wordpress-login?replies=8

    Same with me, I tried a vanilla installation of bbPress 0.8.3 on my local machine, however, there is a slight difference:

    I entered the ‘root’ as username in config.php, but the error itself is

    Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user ‘www-data’@’localhost’ (using password: NO) in /var/www/bbpress/bb-includes/db-mysqli.php on line 80

    .

    There does not exist a user called ‘www-data’ on my mysql-server and I am completely sure that I filled in ‘root’ in config.php.

    I’ve started a trac ticket to keep track of this bug.

    http://trac.bbpress.org/ticket/745


    chrishajer
    Participant

    @chrishajer

    I just checked out r951 and I can duplicate this on a vanilla install without integration. I think the problem is with line 80 in db-mysqli.php:

    if ( !empty($this->charset) && version_compare(mysql_get_server_info(), '4.1.0', '>=') )

    I think mysql_get_server_info() should be mysqli_get_server_info()

    Since the connection was made a couple lines earlier with @mysqli_connect, there is no mysql_connect link identifier, and none is passed in, so line 80 generates a warning and the setting of the charset errors out, and would never happen.

    If you add the i to line 80, the warnings go away. I added my comments to the trac ticket.


    StefanJohansson
    Member

    @stefanjohansson

    Will try this later today. Seems like a solution!


    StefanJohansson
    Member

    @stefanjohansson

    The first warning disappeared!

    Only three warnings left:

    Warning: mysqli_get_server_info() expects exactly 1 parameter, 0 given in /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-includes/db-mysqli.php on line 80

    Warning: Cannot modify header information - headers already sent by (output started at /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-includes/db-mysqli.php:80) in /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-admin/install.php on line 10

    Warning: Cannot modify header information - headers already sent by (output started at /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-includes/db-mysqli.php:80) in /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-includes/functions.php on line 1898


    Sam Bauers
    Participant

    @sambauers

    Try changing line 80 from this:

    if ( !empty($this->charset) && version_compare(mysql_get_server_info(), '4.1.0', '>=') )

    to this:

    if ( !empty($this->charset) && version_compare(mysqli_get_server_info($this->$dbhname), '4.1.0', '>=') )


    StefanJohansson
    Member

    @stefanjohansson

    Fine, now the first step of the installation works.

    During the second step the following warnings appear:

    Warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'nicuuorg'@'localhost' (using password: NO) in /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-admin/upgrade-schema.php on line 6

    Warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-admin/upgrade-schema.php on line 6

    But the forums seems to run ok now!


    chrishajer
    Participant

    @chrishajer

    The important thing to change in line 80 is from

    mysql_get_server_info

    to

    mysqli_get_server_info
    ^

    There’s a letter I in there and it does not look like you changed that based on your error message. You also still need to have the $this->$dbhname as the parameter as well (maybe you already did that, but did not catch the I part.)


    StefanJohansson
    Member

    @stefanjohansson

    Well, I did change to “mysqli” on line 80 in db-mysqli.php.

    Those latter warnings appeared during Step2 in the installation process, and is related to line 6 in upgrade-schema.php.

    I have changed line 6 to

    if ( version_compare($this->$dbhname, '4.1.0', '>=') )

    but still get this warning:

    Warning: mysqli_get_server_info() expects exactly 1 parameter, 0 given in /home/nicuuorg/public_html/neonatologyforparents/wp/bbp/bb-admin/upgrade-schema.php on line 6

    PS. When I added $this->$dbhname inbetween the brackets “mysqli_get_server_info()” I got a fatal error during installation.


    chrishajer
    Participant

    @chrishajer

    Stefan, take a look at this trac ticket:

    http://trac.bbpress.org/ticket/745

    mdawaffe is actively working on it.

    mdawaffe’s most recent changes work for me. I applied the last patch he postet to that ticket and all warnigs disappeared.

    Same here – works great

    Excellent!! This needs to be made a sticky!!! 745c changes made it all good. Thank you!

    I am still getting error after making all the recommended changes

    Warning: mysqli_get_server_info() expects parameter 1 to be mysqli, boolean given in /home/.mascot/digitalguruz/sheetudeep.com/bbpress/bb-includes/db-mysqli.php on line 80
    Cannot select DB.


    chrishajer
    Participant

    @chrishajer

    Which changes did you make? Did you apply the 745c.diff patch from trac?

    http://trac.bbpress.org/ticket/745

    All right to make patches but why hasn’t there been a downloadable bug fix release yet? I got the same errors on a vanilla install from the most current version I downloaded from the site.

    Gene


    livibetter
    Member

    @livibetter

    I believe the time for next release will be soon. If you like to try, you can check out the trunk, the installing process and options page are great!


    chrishajer
    Participant

    @chrishajer

    I hope there’s a new release soon as well, but it doesn’t look like a date has been set yet?

    http://trac.bbpress.org/milestone/0.8.4%20%26%20Pings

    raygene: you can always download the latest development release which generally has all the discussed patches applied:

    http://trac.bbpress.org/changeset/988/trunk?old_path=%2F&format=zip

    There is always a link to the zip archive at the bottom of the trac browser.

    http://trac.bbpress.org/browser/trunk


    Sam Bauers
    Participant

    @sambauers

    The very latest trunk [988] is a little unstable.

    You are better off with [980] the zip download of [980] can be found at the bottom of the following page:

    http://trac.bbpress.org/browser/trunk?rev=980

    There is still a set of problems with this. The value of $this->$dbhname isn’t checked before it’s used in mysql_get_server_info() on line 75 in db-mysqli.php. If the connection fails, the error won’t be echoed to the user because the use of @ on the mysql_connect() call and then the script just continues, assuming the connection went fine, which in my case, it din’t. Also, the call should be to mysql<b>i</b>_connect() and not mysql_connect(), as far as I can understand.

    The patch doesn’t fix these problems and they need to be fixed for bbPress to work on my host. I’d write these comments on the associated ticket, but there doesn’t seem to be any way to register or comment anonymously there.


    livibetter
    Member

    @livibetter

    745 is not for fixing unix socket connection.

    Try this: http://bbpress.org/forums/topic/cannot-select-db-error?replies=11#post-12434

    Which version of bbPress should I check out / download and apply the patch to? Trunk?

Viewing 25 replies - 1 through 25 (of 27 total)

You must be logged in to reply to this topic.