Membershsip script

webman
05:18:13
Hello,
I downloaded memberscript to test and learn from this website but am having some problems executing the codes here is what triggers.
"Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)' in C:\wamp\www\Membership-Managi\config.php:16 Stack trace: #0 C:\wamp\www\Membership-Managi\config.php(16): PDO->__construct('mysql:host=loca...', 'root', 'test') #1 C:\wamp\www\Membership-Managi\index.php(21): dataConnect() #2 {main} thrown in C:\wamp\www\Membership-Managi\config.php on line 16"

Here is the code below========================
<?php
function dataConnect() {
global $dbo;

////////////// Update database login information here //////////////

$info['dbhost_name'] = "localhost";
$info['database'] = "mem-mgmt-v1";
$info['username'] = "root";
$info['password'] = "";

/////////// Don't edit below this line ///////////

$dbConnString = "mysql:host=" . $info['dbhost_name'] . "; dbname=" . $info['database'];

$dbo = new PDO($dbConnString, $info['username'], $info['password']);
$dbo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_SILENT);
//$dbo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$error = $dbo->errorInfo();
if($error[0] != "") {
//print "<p>DATABASE CONNECTION ERROR:</p>Check info details";
//print_r($error);
}
}

?>

i need urgent response to help me continue with the code study
smo1234
05-21-2013
It looks like you have proble with your database connection. Check that you have pdo support available

What is the php version you are using ?
webman
05-21-2013
my php version is 5.2.6 and pls how do i enable PDO successful on my wamp server i got some info online trying to enable it but it did not work i need details on how to make the above code work on my wamp.
thank
smo1234
05-21-2013
All details of PDO installation and enable with screen shots is available here.

It is always better to use PDO mainly for security reasons.
webman
05-21-2013
i tried to follow the steps i could not locate php installation in control panel.please can you guide me in a layman language that i will understand.i went to control panel click on it then click on program and features there is no where to click php installation.i really need to sort this out thanks once again.
smo1234
05-21-2013
It is like any other program installed , you can see list of programs you have installed inside your Program and features. Select PHP or wamp what ever is there, you can list them in the order of installation date also. After selecting you can see a link at the top saying unistall, chage or modify etc. Click change and you will get all options to change it, here you add PDO as per screen shots.
webman
05-21-2013
Sorry,i went to control panel click on programs and feature when i clicked on wamp it says do you want to uninstall permanently.this is getting complicated to me.Does windows version have anything to do with this?i am using windows 7 the steps you have explained to me have not been able to get through.
I click on control panel click on programs and features by my left hand side there is tab that says turns windows features on/off i clicked it.when i clicked on it what popped out was Dialogue box with check button listed below the information
Games
Indexing service
IIS
IIshwc(internet infor services hostable web core
media features
microsoft .NET framework 3.5.1
Microsoft message queque
i cannot list all there is no wamp neither php installation to click on there.
is there a way i can do it manually from Php.ini whereby i can modiy it to make the PDO work on wamp pls do not be bored by my complain i really need to have this sort out today i have been battling with it for about a week.
smo1234
05-22-2013
Try this, http://www.plus2net.com/php_tutorial/php5-iis7-configuration.php
Few more are there.
Not used wamp, but you can go for installing mysql and then go for php.
Please Login to post your reply or start a new topic