mananx Posted February 28, 2009 Share Posted February 28, 2009 Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'ODBC'@'localhost' (using password: NO) in D:\Installed Programes\Apache\htdocs\vid\index.php on line 25 Error connecting Line 25 says : $con=mysql_connect ($db_host,$db_user,$db_pass) or die("Error connecting"); These variables are being accessed from : require("http://localhost/vid/dbconfig.php"); It works when I replace database variables with values , but I am unable to find out error source can any one guide thanks Link to comment https://forums.phpfreaks.com/topic/147263-database-error/ Share on other sites More sharing options...
ratcateme Posted February 28, 2009 Share Posted February 28, 2009 can you show us all the code upto line 25 and the code in vid/dbconfig.php really the only problem is that you have the variable names wrong Scott. Link to comment https://forums.phpfreaks.com/topic/147263-database-error/#findComment-773063 Share on other sites More sharing options...
PFMaBiSmAd Posted February 28, 2009 Share Posted February 28, 2009 You are using a URL in your require() statement. That does NOT include that code in the file, it only includes any HTML content that the file outputs, the same as if you browsed to that file. You need to use a file system path in a require() statement in order to include the php code in the file. Link to comment https://forums.phpfreaks.com/topic/147263-database-error/#findComment-773067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.