phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

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!

phpbb3 >RC4, db connect issues.

Postby BoaConstrictor » Mon Oct 22, 2007 10:59 am

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]
$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? :)
BoaConstrictor
Registered User
 
Posts: 4
Joined: Mon Oct 22, 2007 9:43 am

Re: phpbb3 >RC4, db connect issues.

Postby Prince of area51 » Tue Oct 23, 2007 1:01 pm

I think advanced users can edit the $db->sql_connect() method call anyway :)
User avatar
Prince of area51
Registered User
 
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK

Re: phpbb3 >RC4, db connect issues.

Postby BoaConstrictor » Tue Oct 23, 2007 3:01 pm

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. :)
BoaConstrictor
Registered User
 
Posts: 4
Joined: Mon Oct 22, 2007 9:43 am

Re: phpbb3 >RC4, db connect issues.

Postby Prince of area51 » Wed Oct 24, 2007 11:27 am

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 :)
User avatar
Prince of area51
Registered User
 
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK

Re: phpbb3 >RC4, db connect issues.

Postby BoaConstrictor » Wed Oct 24, 2007 10:51 pm

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.

Postby BoaConstrictor » Wed Oct 24, 2007 11:02 pm

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.
BoaConstrictor
Registered User
 
Posts: 4
Joined: Mon Oct 22, 2007 9:43 am

Re: phpbb3 >RC4, db connect issues.

Postby Prince of area51 » Thu Oct 25, 2007 9:23 am

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

Re: phpbb3 >RC4, db connect issues.

Postby Prince of area51 » Mon Nov 19, 2007 3:56 pm

yay .. we have a fix .. congratz :D go naderman :P
User avatar
Prince of area51
Registered User
 
Posts: 133
Joined: Mon Jun 27, 2005 8:46 pm
Location: Manchester, UK


Return to [3.0/Olympus] Discussion

Who is online

Users browsing this forum: No registered users and 15 guests