Page 1 of 1

Local server help

Posted: Tue Jul 19, 2005 2:41 pm
by Smackie
I set up a local hosting (wamp) on my system so i could use it as a testing server so i can setup alot of my scripts and make them all work and all but for some reason i get this error when i try connecting to MySQL can someone help me?

Code: Select all

Warning: mysql_pconnect() їfunction.mysql-pconnect]: Access denied for user 'dbuser'@'localhost' (using password: YES) in c:\program files\e-novative\WAMP\www\db.php on line 11
Couldn't connect to server.

db.php

Code: Select all

<? 
/*  Database Information - Required!!  */
/* -- Configure the Variables Below --*/
$dbhost = 'localhost';
$dbuser = 'username';
$dbpasswd = 'password';
$database = 'databasename';

/* Database Stuff, do not modify below this line */

$connection = mysql_connect("$dbhost","$dbuser","$dbpasswd") 
	or die ("Couldn't connect to server.");
	
$db = mysql_select_db("$database", $connection)
	or die("Couldn't select database.");
?>
line 11

Code: Select all

$connection = mysql_connect(&quote;$dbhost&quote;,&quote;$dbuser&quote;,&quote;$dbpasswd&quote;)
Thank you
Smackie

Posted: Tue Jul 19, 2005 6:06 pm
by Burrito
I assume you created a user account for the user to access the mysql server?

can you access the db from the command line?

Posted: Tue Jul 19, 2005 10:32 pm
by Smackie
yes i can access the database and yes i have a username and password for it too...

Posted: Tue Jul 19, 2005 10:43 pm
by infolock
according to your warning, ur using pconnect, but your code above shows you only using connect?

care to ensure you have posted the correct code/error? thanks

Posted: Tue Jul 19, 2005 10:49 pm
by Smackie
never mind about that i got that working :-\ :? i just uninstalled it reinstalled it and its working but i got a new problem :? so of my stuff that i use in php shows up like this and alot of other ways

Code: Select all

Notice: Undefined index: op in c:\program files\e-novative\WAMP\www\join.php on line 14
What can be causeing this?

..........
Smackie

Posted: Wed Jul 20, 2005 12:44 pm
by timvw
trying to access things that are in $_GET (or $_POST) that don't exist?