gaugeboson Posted February 23, 2008 Share Posted February 23, 2008 <?php include("dfconfig.php"); if(isset($_GET['id']) == TRUE) { if(is_numeric($_GET['id']) == FALSE) { $error = 1; } if($error == 1) { header("Location: " . $config_basedir); } } else { header("Location: " . $config_basedir); } require("dfheader.php"); $topic = "SELECT topics.subject, topics.forum_id, forums.name FROM topics, forums WHERE topics.forum_id = forums.id AND topics.id = " . $validtopic . ";"; $topicresult = mysql_query($topicsql); $topicrow = mysql_fetch_assoc($topicresult); echo "<h2>" . $topicrow['subject'] . "</h2>"; echo "<a href='dfindex.php'>" . $config_forumsname . " forums</a> -> <a href='dfviewforum.php?id=" . $topicrow['forum_id'] . "'>" . $topicrow['name'] . " </a><br /><br />"; $threadsql = "SELECT messages.*, users.username FROM messages, users WHERE messages.user_id = users.id AND messages.topic_id = " . $validtopic . " ORDER BY messages.date;"; $threadresult = mysql_query($threadsql); echo "<table>"; while($threadrow = mysql_fetch_assoc($threadresult)) { echo "<tr><td><strong>Posted by <i>" . $threadrow['username'] . " </i> on " . date("D jS F Y g.iA", strtotime($threadrow['date'])) . " - <i>" . $threadrow['subject'] . " </i></strong></td></tr>"; echo "<tr><td>" . $threadrow['body']. "</td></tr>"; echo "<tr></tr>"; } echo "<tr><td>[<a href='dfreply.php?id=" . $validtopic . "'>reply</a>]</td></tr>"; echo "</table>"; require("dffooter.php"); ?> So when I run this with just the config, header, and footer files, it works. Inserting all of the other code for some reason gives me the 'object not found' error message. Quote Link to comment Share on other sites More sharing options...
drisate Posted February 23, 2008 Share Posted February 23, 2008 What is in include("dfconfig.php"); and what line is the error pointing at? Quote Link to comment Share on other sites More sharing options...
gaugeboson Posted February 23, 2008 Author Share Posted February 23, 2008 <?php $dbhost = "localhost"; $dbuser = ""; $dbpassword = ""; $dbdatabase = "forum"; $config_forumsname = "CineForums"; $config_admin = ""; $config_adminemail = ""; $config_basedir = "http://127.0.0.1/sites/forums/"; ?> There is no error message pointing out a particular line. I simply get an error 404 message. Quote Link to comment Share on other sites More sharing options...
drisate Posted February 23, 2008 Share Posted February 23, 2008 the problem most likly comes from header("Location: " . $config_basedir); the only thing i can see is $config_basedir is set to $config_basedir = "http://127.0.0.1/sites/forums/"; is that a good path? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.