I'm using PHP Version 5.6.25 that was installed via WAMPP. I'm having issues connecting to my database on mySQL DB:
$server = 'jdbc:sqlserver://DB-1\POWERPIVOT;databaseName=SBV_Foldio';
$user = 'sa';
$pass = 'host';
I had check PDO extension and already install
if (!defined('PDO::ATTR_DRIVER_NAME')) {
echo 'PDO is unavailable<br/>';
}
elseif (defined('PDO::ATTR_DRIVER_NAME')) {
echo 'PDO is available<br/>';
}
PDO is available
but when i run connection
try {
$dbh = new PDO($server, $user, $pass);
$dbh = null;
} catch (PDOException $e) {
print "Error!: " . $e->getMessage() . "<br/>";
}
it failed
Error!: could not find driver
phpinfo();check if you have pdo_mysql in there. In case you are on Linux: check whether you have the proper packages installed:dpkg --get-selections | grep php5-mysql- Xatenev