phpbb3 >RC4, db connect issues.

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
BoaConstrictor
Registered User
Posts: 4
Joined: Mon Oct 22, 2007 9:43 am

phpbb3 >RC4, db connect issues.

Post by BoaConstrictor »

Any reason why you changed the initiation of the db object to:

Code: Select all

$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false);
from:

Code: Select all

$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, true, true);
[code]
?

Setting the newlink to false, kind of ruins integration with other applications, as phpbb3 "hijacks" the MySQL connecton.

Is it possible to change it to:
[code]
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, true, false);
[code]

Or even better, make the persistant and newlink part of the connection configurable in config.php for advanced users? :)

User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Re: phpbb3 >RC4, db connect issues.

Post by Prince of area51 »

I think advanced users can edit the $db->sql_connect() method call anyway :)

BoaConstrictor
Registered User
Posts: 4
Joined: Mon Oct 22, 2007 9:43 am

Re: phpbb3 >RC4, db connect issues.

Post by BoaConstrictor »

That's true, but most users of products that integrate with phpbb isn't advanced users.
I'm helping out with the http://www.phpraider.com project. We have made an authentication module that uses phpbb3 for authentication.

In cases like that it's alot easier to tell users to just change this setting in config.php than having to give them a recipe on how to change phpbb3 for each revision they install. :)

User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Re: phpbb3 >RC4, db connect issues.

Post by Prince of area51 »

Well if you are actually doing that then adding a config field in the config table and an option somewhere in the CP would not be a problem for one of the devs. I can understand the reasons by Devs do not want newbie (admins) to mess with the connection settings. But I'm sure your team can write a small code to get over this hurdle :)

BoaConstrictor
Registered User
Posts: 4
Joined: Mon Oct 22, 2007 9:43 am

Re: phpbb3 >RC4, db connect issues.

Post by BoaConstrictor »

I'm afraid you're missing the point here.

The point is: To fix this, I have to change phpbb3 files.

What happens when the user upgrades their installation to RC8 then?
The fix will be gone and have to be implemented again.

A small change in phpbb3 code, to make phpbb3 accept config setting for this (I can even make that code for you :) ) will give us a: Oki, just add this to your config file. Upgrading to RC8 usually don't touch the config files.

It might be that we have a bit different views on how to develop also :)

BoaConstrictor
Registered User
Posts: 4
Joined: Mon Oct 22, 2007 9:43 am

Re: phpbb3 >RC4, db connect issues.

Post by BoaConstrictor »

Now, here's how the code to instance the DB object could have been written:

Code: Select all

$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, (isset($db_persistency)?$db_persistency:false),(isset($db_newlink)?$db_newlink:false));
Now it works exactly like now, setting persistency to false and new_link to false, unless someone has declared the variables $db_persistency or $db_newlink, then it uses those instead.

That kind of solves my problems. No need to add a field in the CP, since those settings belong with the db settings anyway. :)

Now, if a user get problems with connection sharing now, I can just tell them to add:

Code: Select all

$db_persistency = false;
$db_newlink = true;
to config.php.

User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Re: phpbb3 >RC4, db connect issues.

Post by Prince of area51 »

Hmm now I do see the point, try reporting it as a bug, its got a high chance of being marked as Review Later but do drop a link to this thread in the bug report. I think the Dev team might give it a thought :)

User avatar
Prince of area51
Registered User
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK
Contact:

Re: phpbb3 >RC4, db connect issues.

Post by Prince of area51 »

yay .. we have a fix .. congratz :D go naderman :P

Post Reply