Topic: two programs with a config.php

I have a gallery script that im trying to integrate i have  the punbb config.php and the gallery config.php

i was wondering if i could add this to the punbb config.php file at the bottom

<?php
session_start();

// db properties
$dbhost = 'dbhost';
$dbuser = 'dbuser'; 
$dbpass = 'pass';    
$dbname = 'dbname';

// an album can have an image used as thumbnail
// we save the album image here
define('ALBUM_IMG_DIR', '/kunden/homepages/40/d174088604/htdocs/model/images/album/');

// all images inside an album are stored here
define('GALLERY_IMG_DIR', '/kunden/homepages/40/d174088604/htdocs/model/images/gallery/'); 

// When we upload an image the thumbnail is created on the fly
// here we set the thumbnail width in pixel. The height will
// be adjusted proportionally
define('THUMBNAIL_WIDTH', 100);

// make a connection to mysql here
$conn = mysql_connect ($dbhost, $dbuser, $dbpass) or die ("I cannot connect to the database because: " . mysql_error());
mysql_select_db ($dbname) or die ("I cannot select the database '$dbname' because: " . mysql_error());
?>
My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: two programs with a config.php

I am fairly there will be some problems with having 2 mysql connections open at once there.

The gallery script doesn't seem to specify which mysql resource to use (php allows that, but then defaults to the last opened one), which could well result in some unexpected behaviour.