Forums

Join

Info

config.php

  1. my database host is like that:
    blabla.bla.pl:1337
    what do i have to write in my
    define('BBDB_HOST', '');
    ?
    if i add blabla.bla.pl:1337 or http://blabla.bla.pl:1337 it doesn't work..

  2. Looking through the source for http://trac.bbpress.org/browser/trunk/bb-includes/db-mysqli.php I don't see the provision for setting a port number (someone correct me if it is actually accounted for somewhere else.)

    MySQL normally operates on port 3306, not 1337, so I don't know if you are making up that port or if your host actually runs MySQL on that port. If he does run MySQL on that port, then I don't know what to do.

    If it's actually port 3306, everything will work fine if you set this in config.php:

    define('BBDB_HOST', 'blabla.bla.pl'); with no http and no colon and no port.

    HTH

  3. yeah thx for reply but actually im using 3305 unfortunately.. 1337 was only an example.
    so... any idea?

  4. Sorry, I do not. WordPress is like this too with no provision AFAIK for a non-standard port.

    But, I was looking at bb-includes/db.php just now and the mysql_connect function is being used. That function can user dbservername.com:port by default according to this page: http://www.php.net/function.mysql-connect

    So, in theory, this should work:

    define('BBDB_HOST', 'blabla.bla.pl:3305');

    Did you try that and it does not work?

  5. yes, i tried and doesn't - i get 'Cannot select DB.' . in wordpress it works.

  6. It looks like WordPress uses the same exact syntax for the connection, so, it SHOULD work. Are you certain the string is exactly the same as the one you have in wp-config.php? If it works in WordPress, I think it should work in bbPress.

  7. yeah it is exactly the same syntax. i would like any moderator to answer.

    it's really important for me.

  8. What host are you using? What database version are they setup with? Have you asked them about it because it should find the available port without actually having it defined in your config as long you just define the hostname or try using localhost.

    Trent

  9. sql.kmr.nazwa.pl:3305 i tried also localhost and host without port defined.
    version of server: 5.0.26-log
    version of mysql: 4.1.11
    http://www.kmr.nazwa.pl - wordpress
    http://www.kmr.nazwa.pl/forum - bbpress.

  10. What do you have in your wp-config for the host and database name in wordpress?

    Trent

  11. wordpress:
    define('DB_HOST', 'sql.kmr.nazwa.pl:3305');
    define('DB_NAME', 'kmr');
    bbpress:
    define('BBDB_NAME', 'kmr');
    define('BBDB_HOST', 'sql.kmr.nazwa.pl:3305');

  12. By the looks of things, mysqli_connect doesn't support the "hostname:port" syntax on remote mysql servers (i.e. other than localhost), but mysql_connect does...

    I've reported this as a bug and submitted a patch here:

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

  13. great, how can i install a patch?

  14. You have download your copy of /bb-includes/db-mysqli.php and then put in the parts in GREEN and take out the parts in RED out of this file:

    http://trac.bbpress.org/attachment/ticket/627/mysqli-connection-port-build788.patch

    Trent

  15. ok works, but i have 2 warnings:

    Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-admin/install.php on line 9

    Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-includes/functions.php on line 1819

    and 3 when i logout in forum:

    Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-includes/pluggable.php on line 37

    Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-includes/pluggable.php on line 37

    Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-includes/pluggable.php on line 166

  16. The error "Warning: Cannot modify header information - headers already sent by" is generally caused by white space before the <?php or after the ?> in a file you edited. Check for that and I think you will find your problem.

    Thanks Sam for submitting that patch :)

  17. I accidentally left a print_r() command in the first upload of the patch. Check line 64 of db-mysli.php, if it has print_r($server); on it, just remove that line completely.

    print_r() forces output, which may explain the errors. Sorry about that.

  18. Warning: Cannot modify header information - headers already sent by (output started at /home/kmr/ftp/forum/config.php:1) in /home/kmr/ftp/forum/bb-includes/pluggable.php on line 166

    when i login. i don't have print_r funciton.

    edit:
    ok, everything seem to be working ok. thank ya ! :)

  19. :D 10x for the answer

  20. You must log in to post.