News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Force New Connection

Started by CmptrWz, March 17, 2008, 09:47:00 PM

Previous topic - Next topic

CmptrWz

Link to Mod

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.

Rocks-HD

how do you make to implanted in smf 1.1.4 or 1.1.x?

because it's is for 2.0.

CmptrWz

I intentionally did not implement it for 1.1.x, only for 2.

Apllicmz




Rocks-HD

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!

maryclare

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.

Advertisement: