FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » mysql port change
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
mysql port change [message #28040] Fri, 07 October 2005 19:31 Go to next message
sjcomp is currently offline  sjcomp   United States
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
sjcomp is currently offline  sjcomp   United States
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous messageGo to next message
sjcomp is currently offline  sjcomp   United States
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 #28102 is a reply to message #28088] Tue, 11 October 2005 14:46 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
$DBHOST variable inside GLOBALS.php

FUDforum Core Developer
Re: mysql port change [message #28106 is a reply to message #28102] Tue, 11 October 2005 15:08 Go to previous messageGo to next message
sjcomp is currently offline  sjcomp   United States
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 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
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 Go to previous message
sjcomp is currently offline  sjcomp   United States
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 Smile

Thanks a lot for your help. It is a quick fix, but it worked.


Regards, Alexander.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Step by step mailing list instructions
Next Topic: Ignore User Override vs Ignore Administrative Messages
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Sep 19 23:56:23 GMT 2024

Total time taken to generate the page: 0.02636 seconds