mysql port change [message #28040] |
Fri, 07 October 2005 19:31 |
sjcomp
Messages: 12 Registered: June 2005
Karma: 0
|
Junior Member |
|
|
Hi everyone,
I am using fudforum within egroupware and everything is working fine, but if I change mysql port, fudforum stops showing messages. I wonder where is the dependency on the mysql port value? Egroupware works fine with a different port.
Thanks a lot.
Regards, Alexander.
|
|
|
Re: mysql port change [message #28042 is a reply to message #28040] |
Fri, 07 October 2005 20:16 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Check the forum's database settings inside GLOBALS.php to ensure the port is there...
FUDforum Core Developer
|
|
|
Re: mysql port change [message #28043 is a reply to message #28040] |
Fri, 07 October 2005 20:53 |
sjcomp
Messages: 12 Registered: June 2005
Karma: 0
|
Junior Member |
|
|
There is no reference to port in globals.php. It may be the case because I am using egroupware. But I looked throuhg the file and I searched for "port" or 3306 and I could not find any references to mysql port number.
Regards, Alexander.
|
|
|
Re: mysql port change [message #28077 is a reply to message #28043] |
Mon, 10 October 2005 15:05 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Port should be part of the database hostname, for example:
localhost:3306
FUDforum Core Developer
|
|
|
Re: mysql port change [message #28088 is a reply to message #28077] |
Mon, 10 October 2005 18:44 |
sjcomp
Messages: 12 Registered: June 2005
Karma: 0
|
Junior Member |
|
|
But where can I find this definition? It looks like the port value is remembered somewhere but I can not find where.
Regards, Alexander.
|
|
|
|
Re: mysql port change [message #28106 is a reply to message #28102] |
Tue, 11 October 2005 15:08 |
sjcomp
Messages: 12 Registered: June 2005
Karma: 0
|
Junior Member |
|
|
I guess this is when egroupware stuff comes in. There is no such variable in GLOBALS.php. And more than that there is no reference to such variable anywhere in the fudforum files.
Regards, Alexander.
|
|
|
Re: mysql port change [message #28109 is a reply to message #28106] |
Tue, 11 October 2005 15:21 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Oh ok I see...
you need to edit the file core.inc and make it pass the port value in addition to the host name.
FUDforum Core Developer
|
|
|
Re: mysql port change [message #28115 is a reply to message #28109] |
Tue, 11 October 2005 16:11 |
sjcomp
Messages: 12 Registered: June 2005
Karma: 0
|
Junior Member |
|
|
I found function fud_egw($t='index', $plain=0), which has the following lines:
switch ($server['db_type']) {
case 'mysql':
$func = $server['db_persistent'] ? 'mysql_pconnect' : 'mysql_connect';
define('fud_sql_lnk',$func($db->Host, $db->User, $db->Password));
mysql_select_db($db->Database,fud_sql_lnk);
break;
So I changed line
define('fud_sql_lnk',$func($db->Host, $db->User, $db->Password));
to
define('fud_sql_lnk',$func('loclalhost:XXX', $db->User, $db->Password));
And it worked. I have mulitple files which had this line under fudforum directory in egroupware and under files directory outside the webroot, so I changed all of them
Thanks a lot for your help. It is a quick fix, but it worked.
Regards, Alexander.
|
|
|