views:

70

answers:

2

I am trying to display a list of my vbulliten threads on a non-vbulliten portion of my site. However I can't select the vbulliten database:

<?php

$host   = "localhost";
$user   = "my username";
$pass   = "my password";
$dbname = "tableprefix_forum";

mysql_connect($host, $user, $pass) or die ("Could not connect to database server.");
mysql_select_db($dbname) or die ("Could not select database.");

?>

I am substituting some things here in this example but all my credentials are correct including my db server username, password and forum db name. So what is the problem? Is it due to some internal security feature in vbulliten, does this system not allow you to connect to it's db if the page trying to connect to it is a non-vbulliten page?

+3  A: 

Vbulletin has NO control over the permissions given by the server. But you do need to make sure that the user/pass you are using has been granted permission to access the database you are requesting.

webdestroya
Yeah, I just had to grant permissions to that user.
Lisa
Be sure to mark your question as answered, and upvote!
webdestroya
A: 

I agree to that answer.

sam