Info
- 19 posts
- 5 voices
- Started 5 years ago by archasek
- Latest reply from esteroizi
- This topic is not resolved
config.php
-
- Posted 5 years ago #
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 5 years ago #
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 5 years ago #
yeah thx for reply but actually im using 3305 unfortunately.. 1337 was only an example.
so... any idea? -
- Posted 5 years ago #
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:portby default according to this page: http://www.php.net/function.mysql-connectSo, in theory, this should work:
define('BBDB_HOST', 'blabla.bla.pl:3305');Did you try that and it does not work?
-
- Posted 5 years ago #
yes, i tried and doesn't - i get 'Cannot select DB.' . in wordpress it works.
-
- Posted 5 years ago #
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 5 years ago #
yeah it is exactly the same syntax. i would like any moderator to answer.
it's really important for me.
-
- Posted 5 years ago #
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 5 years ago #
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. -
- Posted 5 years ago #
What do you have in your wp-config for the host and database name in wordpress?
Trent
-
- Posted 5 years ago #
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 5 years ago #
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:
-
- Posted 5 years ago #
great, how can i install a patch?
-
- Posted 5 years ago #
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 5 years ago #
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 5 years ago #
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 5 years ago #
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 5 years ago #
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 166when i login. i don't have print_r funciton.
edit:
ok, everything seem to be working ok. thank ya ! :) -
- Posted 1 year ago #
:D 10x for the answer
-
You must log in to post.