The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I keep getting the following warnings when i try and connect to my vbulletin database.
Warning: mysql_connect(): Access denied for user 'nobody'@'localhost' (using password: YES) in /testing.php on line 7 Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /testing.php on line 8 Warning: mysql_query(): Access denied for user 'nobody'@'localhost' (using password: NO) in /testing.php on line 14 Warning: mysql_query(): A link to the server could not be established in /testing.php on line 14 Access denied for user 'nobody'@'localhost' (using password: NO) I'm using the following code to connect to the database $strServer="localhost"; // Server IP Address 'or' Name $strDatabase="xxx"; // Database Name $strUser="xxx"; // User ID $strPwd="xxx"; // Password $strDB=mysql_connect("$strServer","$struser","$str Pwd"); $database=mysql_select_db($strDatabase,$strDB); and i've made sure the correct details have been entered. I'm connecting to the database from a non vbulletin page, it's custom. Any ideas? I've tried a few different connection techniques but all result in the same warnings. Thanks in advance KJ PS. i've searched the forums and see that this is a common issue and is usually resolved by correcting account details but this is not the case here ![]() |
#2
|
|||
|
|||
![]()
Your $struser is all lowercase, it should be $strUser
![]() And you don't need apostrophes in your mysql_connect function. Also, just wondering.. on your non-vb page, are you including vb's global.php or is this page seperate? If so, there's no need to create another connection to your database. |
#3
|
|||
|
|||
![]()
Cannot believe i didn't spot that. Thanks again. I've not included the global.php file. Would it be more efficient to do that?
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|