bbPress

Simple, Fast, Elegant

bbPress support forums » Installation

config.php

(18 posts)
  • Started 1 year ago by archasek
  • Latest reply from archasek
  • This topic is not resolved
  1. archasek
    Member

    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..

    Posted 1 year ago #
  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

    Posted 1 year ago #
  3. archasek
    Member

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

    Posted 1 year ago #
  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?

    Posted 1 year ago #
  5. archasek
    Member

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

    Posted 1 year ago #
  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.

    Posted 1 year ago #
  7. archasek
    Member

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

    it's really important for me.

    Posted 1 year ago #
  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

    Posted 1 year ago #
  9. archasek
    Member

    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
    www.kmr.nazwa.pl - wordpress
    www.kmr.nazwa.pl/forum - bbpress.

    Posted 1 year ago #
  10. What do you have in your wp-config for the host and database name in wordpress?

    Trent

    Posted 1 year ago #
  11. archasek
    Member

    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');

    Posted 1 year ago #
  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

    Posted 1 year ago #
  13. archasek
    Member

    great, how can i install a patch?

    Posted 1 year ago #
  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

    Posted 1 year ago #
  15. archasek
    Member

    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

    Posted 1 year ago #
  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 :)

    Posted 1 year ago #
  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.

    Posted 1 year ago #
  18. archasek
    Member

    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 ! :)

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.