Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: CmptrWz on March 17, 2008, 09:47:00 PM

Title: Force New Connection
Post by: CmptrWz on March 17, 2008, 09:47:00 PM
Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1126)

Add the ability to force a new connection to the database when using MySQL or Postgresql.

When you have SMF and another application in the same database and are integrating them, such as with SSI.php, the database handle is re-used by default. This mod allows you to specify a variable, either before SSI.php is called or in Settings.php, that will force a new, separate connection for SMF's use.

Just add

$db_fnewconn = true;

Either in Settings.php or before including SSI.php.

(may need to be made a global, depending on your integration method)

Tested with MySQL, should work with Postgresql.
Title: Re: Force New Connection
Post by: Rocks-HD on June 05, 2008, 12:15:32 PM
how do you make to implanted in smf 1.1.4 or 1.1.x?

because it's is for 2.0.
Title: Re: Force New Connection
Post by: CmptrWz on June 10, 2008, 10:39:33 AM
I intentionally did not implement it for 1.1.x, only for 2.
Title: Re: Force New Connection
Post by: Apllicmz on June 11, 2008, 02:53:46 PM
Nice Work good mod
Title: Re: Force New Connection
Post by: Rocks-HD on August 17, 2008, 05:11:30 PM
I try in my smf 2.0 beta 3.1 public and work very well

My site is more fast with this mod

thanks for the post!
Title: Re: Force New Connection
Post by: maryclare on November 17, 2011, 02:49:15 PM
Hello.  I have been searching for a fix to my problem and maybe this is it.
I have a forum running on 1.15.
Have had several problems getting it updated to 2.0.
Installed a new forum (2.0) in a new directory, but want it to link to the 1.15 dbase, otherwise I lose all of my posts.  No luck on that end.
I don't mind continually trying to get my  1.15 updated, but when I do that on the active forum, and it completely crashes, the forum is down until I restore it,
Could I copy my existing 1.15 forum to a new directory, pointing to the same db, and get though the update struggles in the 'background' on the 'shadowed forum' using this mod?

Any suggestions would be Greatly appreciated.