Jump to content

MultiForum URL issues


Ruko

Recommended Posts

Im trying to make a multiforum software for phpBB and im stuck. Ive been trying to figure this out for HOURS and still, I end up with f**king syntax errors.

 

Kind of hard to explain. If they visit forumname.terraboards.com then it will load their forum tables. But instead I end up with errors. The codes I tried does not work. Now I don't know where to start.s I feel like im trying to create a impossible triangle.

 

Is there any solution?

 

 

My Code:

$serverurl = $_SERVER["HTTP_HOST"];
$forumurl = "SELECT * FROM 'forumaccounts' WHERE forumurl LIKE '. $serverurl .'";
$result=mysql_query($sql, $con) or die(mysql_error());
while ($row=mysql_fetch_array($result))
{

if ($_SERVER["HTTP_HOST"] == '$row["forumurl"];')
{
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = '***_phpbbmulti';
$dbuser = '***_phpbbm';
$dbpasswd = '****';
$table_prefix = '$row["forumprefix"];';
$acm_type = 'file';
$load_extensions = '';
}
else {
die ("Invalid forum");
}
}

Link to comment
https://forums.phpfreaks.com/topic/222276-multiforum-url-issues/
Share on other sites

rewrote the code, looks like im getting there. Also I get this phpBB error now:

Warning: require(./includes/acm/acm_.php) [function.require]: failed to open stream: No such file or directory in /home/ruko/public_html/phpBB3MULT6242/common.php on line 189

 

if ($_SERVER["HTTP_HOST"] == '*.terraboards.co.cc') {
$selectdb = mysql_select_db("ruko_forumaccounts", $con);
$serverurl = $_SERVER["HTTP_HOST"];
$forumurl = "SELECT * FROM 'forumaccounts' WHERE forumurl LIKE '. $serverurl .'";
$result=mysql_query($sql, $con) or die(mysql_error());
while ($row=mysql_fetch_array($result))
{
if ($_SERVER["HTTP_HOST"] == '"$row["forumurl"];"')
{
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'ruko_phpbbmulti';
$dbuser = 'ruko_phpbbm';
$dbpasswd = '*****';
$table_prefix = '$row["forumprefix"];';
$acm_type = 'file';
$load_extensions = '';
}
}
}

Edited some parts of the code, and got this error:

Query was empty

if ($_SERVER["HTTP_HOST"]) {
$selectdb = mysql_select_db("ruko_forumaccounts", $con);
$serverurl = $_SERVER["HTTP_HOST"];
$forumurl = "SELECT * FROM forumaccounts WHERE forumurl = '. $serverurl .'";
$result=mysql_query($sql, $con) or die(mysql_error());
while ($row=mysql_fetch_array($result))
{
if ($_SERVER["HTTP_HOST"] == '"$row["forumurl"];"')
{
$dbms = 'mysqli';
$dbhost = 'localhost';
$dbport = '';
$dbname = 'ruko_phpbbmulti';
$dbuser = 'ruko_phpbbm';
$dbpasswd = 'luigi1997';
$table_prefix = '$row["forumprefix"];';
$acm_type = 'file';
$load_extensions = '';
}
}
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.