Update 1: @Fred -ii- Thanks! That resolved that issue by restarting those services.
Next problem that I'm getting when running in Neatbeans now
Uncaught exception 'PDOException' with message 'SQLSTATE[IM002] SQLDriverConnect: 0 [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I understand that Access is not the preferred method, but this for a Project so the tools are out of my hands.
To clarify I am running this on Windows 7 x64.
This is what I'm making -
A php login that will see if a user exist in a database already, if not it will add them. For simplicity's sake we're not concerned if someone else already has this user name.
I have no PHP experience, so after finally getting XAMMP and all other required things setup to run PHP through Neatbeans, I'm at a new problem involving PDO and understanding how it works.
<?php
echo '<pre>';
print_r(PDO::getAvailableDrivers());
if(isset($_REQUEST['attempt']))
{
$user = $_POST['user'];
$password = $_POST['password'];
}
//Path to our database
$database_path = "./Users.accdb";
if(!file_exists($database_path))
{
die("Acess database file not found!");
}
$conn = new PDO("odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=".$database_path.";Uid=; Pwd=;");
?>
<form method="post" action="index.php?attempt">
User <input type="text" name="user" /><br />
Pass <input type="password" name="password"><br />
<input type="submit" />
</form>
Everything worked until I had to actually open a connection to the database. This is the error I'm getting when I run in Netbeans.
"Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in C:\xampp\htdocs\Php_Login\index.php:22"
This is the output of my available drivers.
[0] => mysql
[1] => sqlite
Am I missing something? I've read through so many pages and I still can't understand why I don't have the required driver for this. I'm not asking anyone to do my Project for me, just some insight into my current roadblock.
Thanks in advance.